Changes to the Tango runtime / GC

Bruno Medeiros brunodomedeiros+spam at com.gmail
Sun Oct 14 04:01:21 PDT 2007


Sean Kelly wrote:
> 
> byte[] b = cast(byte[]) new void[5]; // hasPointers is set
> byte[] c = b[1 .. $];
> 
> b.length = 10; // hasPointers is retained because no realloc occurs
> b.length = 20; // hasPointers is retained because of new logic
> 
> c.length = 1;  // hasPointers is retained because of new logic
> c.length = 20; // hasPointers is retained because of new logic
> 

So, is there a way to allocate an uninitialized byte[] that has 
hasPointer set to false?

-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list