rt_finalize WTFs?

Vladimir Panteleev vladimir at thecybershadow.net
Mon Dec 5 01:31:32 PST 2011


On Mon, 05 Dec 2011 10:14:00 +0200, Rainer Schuetze <r.sagitario at gmx.de>  
wrote:

> Try moving the try/catch block out of the loops that call rt_finalize.

This sounds like a good idea. Just make sure that all code paths that lead  
to rt_finalize (e.g. delete) can recover from an exception.

> (maybe just remove it, onFinalizeError just rethrows, and it seems noone  
> is using the information that the exception is thrown from inside the  
> finalizer)

The point of onFinalizeError is that it throws an *error* (it is  
unrecoverable). Currently, the GC cannot recover from an exception thrown  
by a finalizer, which is why onFinalizeError exists.

-- 
Best regards,
  Vladimir                            mailto:vladimir at thecybershadow.net


More information about the Digitalmars-d mailing list