Mercurial > projects > dstress
annotate run/destructor_01.d @ 140:a33ad7189d21
1) news:// -> news:
2) nttp://.../...:... -> nntp://.../.../...
3) added missing mime types
4) added line ending styles
5) added missing keywords
author | thomask |
---|---|
date | Tue, 16 Nov 2004 16:00:10 +0000 |
parents | 3414705c41ac |
children | f87ba6507260 |
rev | line source |
---|---|
140 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
0 | 4 |
5 // @author@ David Friedman <d3rdclsmail@earthlink.net> | |
6 // @date@ 2004-05-01 | |
140 | 7 // @uri@ news:c6v105$1flg$1@digitaldaemon.com |
0 | 8 |
9 int status; | |
10 | |
11 class ClassA{ | |
12 this(){ | |
13 status++; | |
14 assert(status==1); | |
15 } | |
16 | |
17 ~this(){ | |
18 status--; | |
19 assert(status==0); | |
20 } | |
21 } | |
22 | |
23 class ClassB : ClassA {} | |
24 | |
25 void test(){ | |
26 auto ClassB b = new ClassB(); | |
27 | |
28 } | |
29 | |
30 int main(){ | |
31 test(); | |
32 return 0; | |
33 } |