Mercurial > projects > ddmd
comparison dmd/Array.d @ 178:e3afd1303184
Many small bugs fixed
Made all classes derive from TObject to detect memory leaks (functionality is disabled for now)
Began work on overriding backend memory allocations (to avoid memory leaks)
author | korDen |
---|---|
date | Sun, 17 Oct 2010 07:42:00 +0400 |
parents | 347de076ad34 |
children | 52188e7e3fb5 |
comparison
equal
deleted
inserted
replaced
177:1475fd394c9e | 178:e3afd1303184 |
---|---|
5 | 5 |
6 import std.exception; | 6 import std.exception; |
7 import core.stdc.string; | 7 import core.stdc.string; |
8 import core.stdc.stdlib; | 8 import core.stdc.stdlib; |
9 | 9 |
10 class Array | 10 import dmd.TObject; |
11 | |
12 class Array : TObject | |
11 { | 13 { |
12 uint dim = 0; | 14 uint dim = 0; |
13 uint allocdim = 0; | 15 uint allocdim = 0; |
14 void** data = null; | 16 void** data = null; |
15 | 17 |
180 { | 182 { |
181 return copyTo(new Array()); | 183 return copyTo(new Array()); |
182 } | 184 } |
183 } | 185 } |
184 | 186 |
185 class Vector(T) | 187 class Vector(T) : TObject |
186 { | 188 { |
187 public: | 189 public: |
188 @property final size_t dim() | 190 @property final size_t dim() |
189 { | 191 { |
190 return _dim; | 192 return _dim; |