forcing "@nogc" on class destructors

via Digitalmars-d digitalmars-d at puremagic.com
Thu Jan 22 07:59:32 PST 2015


On Thursday, 22 January 2015 at 11:58:13 UTC, Steven 
Schveighoffer wrote:
> A race condition can LEAD to this being triggered, but the 
> abort itself is not a race condition. And forcing a default of 
> @nogc will not fix this.

Why not? If you have a race condition that leads a memory leak 
when using explicit deallocation, then that leak will lead to 
destructor being run by the collector. Which will fail if the 
destructor gc-allocates. GC is meant to make allocation safer, 
not less safe.


More information about the Digitalmars-d mailing list