Mail Archives: djgpp/1998/07/18/02:31:18
On Fri, 17 Jul 1998, Michael Tanczos wrote:
> When are deconstructors called when using classes? At the
> end of the program if it's declared statically.. or when
> you delete the object if it's declared dynamically? Or do
> you need to call the deconstructor directly..
>
For global objects it's upon program termination
For local function objects it's upon leaving the scope (end of function)
and for dynamic object (created with new) you have to call delete to call
the destructor
> ---
> Michael Tanczos
>
- Raw text -