140
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
0
|
4
|
|
5 // @author@ David Friedman <d3rdclsmail@earthlink.net>
|
|
6 // @date@ 2004-05-01
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=51
|
0
|
8
|
374
|
9 module dstress.run.destructor_01;
|
|
10
|
0
|
11 int status;
|
|
12
|
|
13 class ClassA{
|
|
14 this(){
|
|
15 status++;
|
|
16 assert(status==1);
|
|
17 }
|
|
18
|
|
19 ~this(){
|
|
20 status--;
|
|
21 assert(status==0);
|
|
22 }
|
|
23 }
|
|
24
|
|
25 class ClassB : ClassA {}
|
|
26
|
|
27 void test(){
|
|
28 auto ClassB b = new ClassB();
|
|
29
|
|
30 }
|
|
31
|
|
32 int main(){
|
|
33 test();
|
|
34 return 0;
|
|
35 }
|