[RFC]Proposal for better garbage collection

deadalnix deadalnix at gmail.com
Fri Feb 24 01:02:44 PST 2012

Le 23/02/2012 20:58, H. S. Teoh a écrit :
> On Thu, Feb 23, 2012 at 01:51:31PM +0200, Manu wrote:
> [...]
>> I wonder if there are alternative ways to detect a foreign stack. And
>> I'm not sure why it even matters, you can't depend on the extern ABI,
>> how do you unwind the stack reliably in the first place?
> [...]
> This is a bit off-topic, but what happens in the current implementation
> if you pass a D callback to a C function, and then throw an exception
> from the callback? Does it work? Or does it do something really nasty?
> T

This will work, but has serious drawbacks.

First of all, you are not sure the C function will release all resources 
(free, fclose, etc . . .). So you cannot be sure of the state of your 

This is something that you don't want to do.

More information about the Digitalmars-d mailing list