annotate norun/delete_03.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents fbee62becd2c
children
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(){
697
fbee62becd2c partial repos review
thomask
parents: 392
diff changeset
20 MyStruct* t = new MyStruct();
fbee62becd2c partial repos review
thomask
parents: 392
diff changeset
21 assert(t);
392
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
22 }
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
23
379
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
24 int main(){
392
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
25 test();
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
26 std.gc.fullCollect();
9faddc0de2ba 1) fixed meta data
thomask
parents: 379
diff changeset
27 std.gc.minimize();
379
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
28 return 0;
60b4ba82210e added tests for custom deallocators
thomask
parents:
diff changeset
29 }