forcing "@nogc" on class destructors

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 20 12:51:17 PST 2015


On 1/20/15 3:39 PM, ketmar via Digitalmars-d wrote:

> and all that mess can be avoided just by enforcing the one simple rule,
> which compiler is perfectly able to check.

I think the current situation is fine.

1. There are functions that sometimes allocate. I don't want to forbid 
those, or force someone to write @nogc versions.
2. One can invoke destructors without being inside the GC.

This seems like a good job for a lint tool.

-Steve


More information about the Digitalmars-d mailing list