annotate norun/delete_03.d @ 392:9faddc0de2ba

1) fixed meta data 2) evade dmd-0.118 loop code
author thomask
date Wed, 06 Apr 2005 18:56:06 +0000
parents 60b4ba82210e
children fbee62becd2c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
379
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
1 // $HeadURL$
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
2 // $Date$
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
3 // $Author$
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
4
392
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
5 // @WARNING@ direct access to Phobos's GC
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
6
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
7 // __DSTRESS_ELINE__ 15
379
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
8
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
9 module dstress.run.delete_03;
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
10
392
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
11 import std.gc;
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
12
379
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
13 struct MyStruct{
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
14 delete(void* p){
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
15 assert(0);
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
16 }
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
17 }
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
18
392
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
19 void test(){
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
20 MyStruct t;
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
21 }
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
22
379
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
23 int main(){
392
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
24 test();
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
25 std.gc.fullCollect();
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
26 std.gc.minimize();
379
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
27 return 0;
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
28 }