annotate run/d/delete_14_B.d @ 1279:23fe17e22a63

partial review
author thomask
date Mon, 25 Dec 2006 15:07:48 +0000
parents 9dcac8d4e97f
children 81222734adf3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1023
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
1 // $HeadURL$
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
2 // $Date$
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
3 // $Author$
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
4
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
5 // @author@ <h3r3tic@mat.uni.torun.pl>
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
6 // @date@ 2006-05-23
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
7 // @uri@ news:bug-154-3@http.d.puremagic.com/bugzilla/
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
8
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
9 module dstress.run.d.delete_14_B;
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
10
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
11 class Foo{
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
12 this(){
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
13 }
1091
9dcac8d4e97f post DMD-0.163 review
thomask
parents: 1023
diff changeset
14
1023
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
15 new (size_t s){
1279
23fe17e22a63 partial review
thomask
parents: 1091
diff changeset
16 return (new byte[s]).ptr;
1023
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
17 }
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
18
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
19 delete(void* p){
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
20 if (p){
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
21 delete p;
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
22 }
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
23 }
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
24 }
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
25
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
26 int main() {
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
27 Foo f = new Foo();
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
28 delete f;
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
29
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
30 return 0;
740c7e3dae39 invalid code generation on linux with custom allocators/deallocators
thomask
parents:
diff changeset
31 }