It is a way to enforce deterministic destruction without ever relying on accidental correctness.
class A
{
~this()
{
if(iscalledByGC())
{
[leak and write an error to stderr]
}
else
{
[normal release of resources]
}
}
}
Prior solution:
http://forum.dlang.org/post/[email protected] but
that involves modifying the runtime.
