[gclist] Finalization and death notices

Pekka P. Pirinen pekka.p.pirinen@globalgraphics.com
Thu, 11 Oct 2001 14:47:26 +0100


Charles Fiterman <cef@geodesic.com> wrote:
> At 02:49 PM 10/10/01 +0100, [Pekka] wrote:
> >When is this not a bug in the program?  Why would it have been already
> >destructed?  [...]

> You can call the destructor by its name class foo; has a destructor named
> foo~(); So users can call destructors without freeing storage.

And if they do that and then free the storage by using delete, that's
a bug.

So I don't see a problem, apart from the one with the collector
needing to call destructors, that I addressed.

> Invoking the destructor turns the Vtabl pointer to zero.

An implementation detail; in general, the object is in an undefined
state.
-- 
Pekka P. Pirinen
This article printed on 100% recycled electrons.