> On Apr 13, 2017, at 10:29 PM, Sven Barth via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> SetLength *does* use a reallocate for this, but since it doesn't give you any 
> guarantee for its success as its the task of the memory manager to deal with 
> this, it's easier to assume that the array is indeed copied.
> 

So the real point here is that ReAllocMem will copy and allocate a new block if 
the old one can’t be resized, therefore this really isn’t about SetLength as 
much as the memory manager itself.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to