[gclist] Finalization and death notices

Greg Colvin gcolvin@us.oracle.com
Mon, 8 Oct 2001 15:34:01 -0600


From: Charles Fiterman <cef@geodesic.com>
> At 03:39 PM 10/8/01 -0400, you wrote:
> >  I've suggested in the past that, if you want to be friendly to both
> >C++ idioms and gc, you need to transparently decouple these two operations.
> 
> C++ almost decouples free and destruct. You can invoke the destructor
> directly by its name. And except for a silly rule against freeing new'ed
> objects you'd be able to free them. Write your own allocator and you can.
> Keeping track of destructors does just require doing something better with
> the vtable pointer than zeroing it.

C++ completely decouples allocation, construction, destruction, and
deallocation.  You can call operator new(), constructors, destructors,
and operator delete() directly.

And by the way, the reason I am interested in C++ is that the standard
is coming back around to the point in the ISO cycle where we can start
to consider extensions, including garbage collection.  The Boehm
collector, the Great Circle collector, and various "smart pointer"
classes are some of the existing practice we have to start with.
The existing practice in java and Limbo is arguably relevant as well. 

> I'm going to repeat a couple of older suggestions. 

I'll think on these, thanks.