Changes to the Tango runtime / GC
0ffh
spam at frankhirsch.net
Sun Oct 14 04:15:05 PDT 2007
Bruno Medeiros wrote:
> So, is there a way to allocate an uninitialized byte[] that has
> hasPointer set to false?
I'd say byte[] defaults to hasPointers=false, so you wouldn't
have to do anything special to make it so.
(It is the void[] that usually has hasPtrs=true.)
But, you can init byte[] with hasPtrs=true with:
byte[] x=cast(byte[])(new void[0x100);
Or you can init a void[] with hasPtrs=false with:
void[] x=cast(void[])(new byte[0x100);
The difference in the new Tango RT is it makes hasPtrs "sticky".
All these details were in:
news://news.digitalmars.com:119/feqoqc$30ji$1@digitalmars.com
Regards, Frank
More information about the Digitalmars-d
mailing list