Hello Christian!
reply to a message from Christian S. Pedersen to All:
CSP> If I "delete" a Class, allocated with "new", will the Class'
CSP> destructor be called ?
You do not "delete" a class (this can't be done since class is a *type* ),
You delete an instance of a class dynamically allocated by new.
delete on a dynamic class instance does:
1st execute the destructor (+ base class destructors, most derived ones
first)
2nd free the memory (either by global ::delete or if You wrote Your own
YourClass::operator delete by that)
bye, Christian!
---
---------------
* Origin: for(;;)full()?sleep():eat(); (2:310/78.19)
|