Less known std.gc

Jarrett Billingsley kb3ctd2 at yahoo.com
Mon Nov 19 14:04:20 PST 2007


"Christopher Wright" <dhasenan at gmail.com> wrote in message 
news:fhsko3$2or4$2 at digitalmars.com...

> My mistake; thank you. That's why I didn't see a 'free' entry in std.gc.
>
> Is there any way to hook up a destructor, besides allocating memory with a 
> constructor? I ask purely out of academic interest; I allocate objects 
> manually in some cases, but I don't need to use destructors with them, 
> currently.

Oddly, there is a "setFinalizer" function in the internal GC implementation, 
but for some reason there is no public function in std.gc that corresponds 
to it.  Maybe it's experimental? 




More information about the Digitalmars-d-learn mailing list