Am 09.02.2014 13:05, schrieb Fred van Stappen:
> if length(MyArray) > 0 then
>   for x := 0 to high(MyArray) do
>     MyArray[x].Free;
> 
> But, if i use :
> 
>  setlength(MyArray, 0) ;
> 
> would it do the same job ?

No. Your array contains only references to the objects. The references
where deleted, but the objects remain in memory without any destructor call.

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

Reply via email to