[Q]:Creating objects _only_ by new ?

4

42Bastian Schick

Hi,

I'd like to prevent classes from beeing instaniated on the stack or
static, means only by new().
The reason: The class describes a process and the attributs must not
be on the stack of the creating process.
 
F

Fei Liu

42Bastian said:
Hi,

I'd like to prevent classes from beeing instaniated on the stack or
static, means only by new().
The reason: The class describes a process and the attributs must not
be on the stack of the creating process.
make the class destructors protected or private. check heap only class.

F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,477
Latest member
ColumbusMa

Latest Threads

Top