Mercurial > projects > dstress
view run/destructor_01.d @ 1330:f3f715978184
Georg Wrede <georg@iki.fi>
2007-01-07
mail:45A120F5.1050108@iki.fi
author | thomask |
---|---|
date | Sat, 13 Jan 2007 10:33:49 +0000 |
parents | f87ba6507260 |
children | b8c0195059d9 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ David Friedman <d3rdclsmail@earthlink.net> // @date@ 2004-05-01 // @uri@ news:c6v105$1flg$1@digitaldaemon.com module dstress.run.destructor_01; int status; class ClassA{ this(){ status++; assert(status==1); } ~this(){ status--; assert(status==0); } } class ClassB : ClassA {} void test(){ auto ClassB b = new ClassB(); } int main(){ test(); return 0; }