Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3685

Show
Ignore:
Timestamp:
06/29/08 13:36:42 (2 months ago)
Author:
kris
Message:

fixed GC issue

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/util/container/more/CacheMap.d

    r3621 r3685  
    6868                this.capacity = capacity; 
    6969                hash.buckets (capacity, 0.75); 
    70                 links = (cast(Ref) calloc(capacity, Type.sizeof))[0..capacity]; 
     70                //links = (cast(Ref) calloc(capacity, Type.sizeof))[0..capacity]; 
     71                links.length = capacity; 
    7172 
    7273                // create empty list 
     
    8889        ~this () 
    8990        { 
    90                 free (links.ptr); 
     91//                free (links.ptr); 
    9192        } 
    9293 
  • trunk/tango/util/container/more/StackMap.d

    r3588 r3685  
    6666                this.capacity = capacity; 
    6767                hash.buckets (capacity, 0.75); 
    68                 links = (cast(Ref) calloc(capacity, Type.sizeof))[0..capacity]; 
     68                //links = (cast(Ref) calloc(capacity, Type.sizeof))[0..capacity]; 
     69                links.length = capacity; 
    6970 
    7071                // create empty list 
     
    8687        ~this () 
    8788        { 
    88                 free (links.ptr); 
     89                //free (links.ptr); 
    8990        } 
    9091