--- Comment #11 from Michel Fortin <> 2010-08-12 
09:54:51 EDT ---
(In reply to comment #8)
> C# and Java have safe finalizers.

Indeed. Java allows resurrection, which means that if you leak a reference to
an object during the collection, the GC won't collect that object and will
leave it in the state it was after the finalizer was called.

This is an interesting idea, but I see two reasons it'll not work fro D. First,
D doesn't emit special code notifying the GC when assigning to a pointer, so
the GC would have to do a full scan again after a collection just to check if
someone resurrected a memory block.

The second reason is the D2 multithreading model. The GC might run on a
different thread. If you resurrect a non-shared object, that object won't live
on the same thread anymore but might continue to reference non-shared memory
from other threads. This is in violation of the thread-safe type system.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to