On 4/30/2014 4:17 PM, H. S. Teoh via Digitalmars-d wrote:
If we're going to have dtors at all, let's do it *right*. Guarantee they always work, and reject all usages that break this guarantee (like putting a struct with dtor inside a class,
Seems to work when I try it:
bar.d:
-------------------------
import core.stdc.stdio;
struct S { ~this() { printf("S.~this()\n"); } }
class C { S s; }
void main()
{
C c = new C();
c = null;
}
-------------------------
C:\cbx\mars>bar
S.~this()
