www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/18/02:31:18

Date: Sat, 18 Jul 1998 01:21:24 -0500 (CDT)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: Michael Tanczos <webmaster AT logic-gate DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Deconstructors
In-Reply-To: <35AFE02F.3C4857ED@logic-gate.com>
Message-ID: <Pine.GSO.3.96.980718012001.19796A-100000@oscar.eecs.uic.edu>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019