DIP74 & GC Destructors

via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 15 09:20:55 PDT 2015


I hope we won't get builtin RC, but that's off-topic.

In any case, there has been talk about introducing finalizers 
instead of destructors for GC managed objects. 
rt_attachDisposeEvent() already exists and is used by std.signal 
for weak references, but it's a hack, it needs to be formalized.

These finalizers can then have much more restricted semantics 
than destructors, e.g. they must be callable on any thread, are 
generally un- at safe if they access members with indirections, and 
so on.


More information about the Digitalmars-d mailing list