Mercurial > projects > dstress
annotate run/destructor_01.d @ 1:3414705c41ac
removed CVS header
author | thomask |
---|---|
date | Sun, 26 Sep 2004 12:06:09 +0000 |
parents | 3269e4627918 |
children | a33ad7189d21 |
rev | line source |
---|---|
0 | 1 |
2 // @author@ David Friedman <d3rdclsmail@earthlink.net> | |
3 // @date@ 2004-05-01 | |
4 // @uri@ news://c6v105$1flg$1@digitaldaemon.com | |
5 | |
6 int status; | |
7 | |
8 class ClassA{ | |
9 this(){ | |
10 status++; | |
11 assert(status==1); | |
12 } | |
13 | |
14 ~this(){ | |
15 status--; | |
16 assert(status==0); | |
17 } | |
18 } | |
19 | |
20 class ClassB : ClassA {} | |
21 | |
22 void test(){ | |
23 auto ClassB b = new ClassB(); | |
24 | |
25 } | |
26 | |
27 int main(){ | |
28 test(); | |
29 return 0; | |
30 } |