I like this idea, I've had some nasty bugs because of this when I just started with D.

But IIRC the language doesn't forbid use of the GC in destructors, meaning it's an implementation issue. I don't know what the problems involved in allowing allocations during sweeps are, but I'd prefer to have support for GC usage in destructors. Having to work around this limitation often results in a load of ugly and overly complex code that should have been only a few straightforward lines.

Reply via email to