comparison run/destructor_01.d @ 0:3269e4627918

init dstress
author svnowner
date Sat, 25 Sep 2004 22:33:30 +0000
parents
children 3414705c41ac
comparison
equal deleted inserted replaced
-1:000000000000 0:3269e4627918
1 // $Header: /home/th/Dokumente/Entwicklung/MEIN_CVS/MiniD/src/run/destructor_01.d,v 1.1 2004/08/20 23:42:52 th Exp $
2
3 // @author@ David Friedman <d3rdclsmail@earthlink.net>
4 // @date@ 2004-05-01
5 // @uri@ news://c6v105$1flg$1@digitaldaemon.com
6
7 int status;
8
9 class ClassA{
10 this(){
11 status++;
12 assert(status==1);
13 }
14
15 ~this(){
16 status--;
17 assert(status==0);
18 }
19 }
20
21 class ClassB : ClassA {}
22
23 void test(){
24 auto ClassB b = new ClassB();
25
26 }
27
28 int main(){
29 test();
30 return 0;
31 }