[fpc-pascal] Re: Objects in dynamic arrays

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Nov 16 11:10:32 CET 2013


On 16 Nov 2013, at 02:36, Martin <lazarus at mfriebe.de> wrote:

> On 16/11/2013 01:03, Timothy Groves wrote:
>>  [last].Destroy;
> 
> destroys the object pointed to by both: t_volumes [last] and t_volumes [index]
> 
> You should have destroyed t_volumes [index] *before* copying the value

And you should call Free instead of Destroy.


Jonas


More information about the fpc-pascal mailing list