back to arays

Derek Parnell derek at psych.ward
Wed May 17 22:23:36 PDT 2006


On Wed, 17 May 2006 22:07:12 -0700, Unknown W. Brackets wrote:

> I should note, currently, DMD's implementation won't move anything 
> you're pointing to.

Even if the length is increased beyond the size that has been allocated for
a dynamic array? I thought that DMD allocated a new block of the right size
and copied data from the old block to it then released the old block back
to the GC.
 
I think that if the length is decreased then no copying goes on and that no
memory is released back to the GC, but can be later reused if the length
then is increased anywhere up to the original allocation size.

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocracy!"
18/05/2006 3:20:14 PM



More information about the Digitalmars-d-learn mailing list