Changeset 5431 for trunk/tango/util/container/Container.d
- Timestamp:
- 04/15/10 01:51:46 (2 years ago)
- Files:
-
- trunk/tango/util/container/Container.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tango/util/container/Container.d
r5418 r5431 130 130 { 131 131 auto p = (cast(T**) calloc(count, (T*).sizeof)) [0 .. count]; 132 GC.addR oot (cast(void*) p);132 GC.addRange (cast(void*) p, count * (T*).sizeof); 133 133 return p; 134 134 } … … 144 144 if (t.ptr) 145 145 { 146 GC.removeR oot(t.ptr);146 GC.removeRange (t.ptr); 147 147 free (t.ptr); 148 148 } … … 181 181 foreach (ref list; lists) 182 182 { 183 GC.removeR oot(list.ptr);183 GC.removeRange (list.ptr); 184 184 free (list.ptr); 185 185 list = null; … … 217 217 auto p = (cast(T*) calloc (chunks, T.sizeof)) [0 .. chunks]; 218 218 lists[$-1] = p; 219 GC.addR oot (p.ptr);219 GC.addRange (p.ptr, T.sizeof * chunks); 220 220 auto head = cache; 221 221 foreach (ref node; p)












