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.
I like this idea, I've had some nasty bugs because of this when I
just started with D.
- Re: An idea to avoid a narrow class of bugs Rene Zwanenburg
- Re: An idea to avoid a narrow class of bugs deadalnix
- Re: An idea to avoid a narrow class of bugs Christophe Travert
- Re: An idea to avoid a narrow class of b... Alex Rønne Petersen
- Re: An idea to avoid a narrow class ... Christophe Travert
- Re: An idea to avoid a narrow class of bugs Jonathan M Davis
- Re: An idea to avoid a narrow class of bugs Benjamin Thaut