On 25-06-2012 15:27, Christophe Travert wrote:
Alex Rønne Petersen , dans le message (digitalmars.D:170616), a écrit :

To me, it is a GC implementation issue. You should be able to allocate
in destructors.

Yes, I don't understand why on earth this limitation is in place. There
is no (good) technical reason it should be there.

Allowing safe unwinding of the stack when throwing exceptions is not a
'good' reason ?

Well, a destructor should rather be no_throw, and should be able to
call no_throw (GC) functions.


I fail to see how this is a problem. The GC (read: finalizer thread) simply has to catch the exception and Do Something Meaningful with it.

--
Alex Rønne Petersen
[email protected]
http://lycus.org


Reply via email to