Documentation of D arrays

BCS ao at pathlink.com
Thu Jan 11 21:17:47 PST 2007


Reply to Sebastian,

> 
> So, new question: How to I pass T[] to foo(), so that foo() isn't
> allowed to change the content of T[]?
> 

T[] abc = //somthing

foo(abc.dup);

the .dup propriety does a GC memory allocation and a memcopy of the old array 
for any array.





More information about the Digitalmars-d mailing list