GC.BlkAttr.FINALIZE
Steven Schveighoffer
schveiguy at yahoo.com
Fri Feb 28 15:30:46 PST 2014
On Fri, 28 Feb 2014 18:26:29 -0500, Namespace <rswhite4 at googlemail.com>
wrote:
> Oh man I need sleep. Of course it is 2 at the end of the scope. But what
> is important: I never see "DTor". So the Data is not finalized.
FINALIZE expects the layout of the block to be an Object. You aren't
implementing the correct internals. Specifically, you need a vtable, which
will point at the dtor. I'm surprised you don't get a segfault.
We need a precise GC to get struct dtors to work, the alternative would be
extremely hackish.
-Steve
More information about the Digitalmars-d-learn
mailing list