On Sunday, 4 May 2014 at 20:49:57 UTC, bearophile wrote:
If we keep class destructors in D, is it a good idea to require them to be @nogc?

This post comes after this thread in D.learn:
http://forum.dlang.org/thread/[email protected]

Bye,
bearophile

Not sure that would be a good idea: "nogc" means "no interacting with the GC". In no way does it prevent accessing a ressource that itself is managed by the GC, which is what the original bug was about.

Furthermore, classes *may* be deterministically desroyed, and preventing it from interacting with the GC, if only to remove scan pointers (think RefCounted/Array) would be needlessly restrictive.

Reply via email to