On 28/03/14 02:50, Xiangrong Fang wrote:
var
   a2: array of array of Integer;
   i, j: Integer;
begin
   SetLength(a2, 3);
   for i := 0 to 2 do begin
     SetLength(a[i], 3);
     for j := 0 to 2 do a[i][j] := 1;
   end;
   a2 := nil; <-- will this free all memory of a[0]...a[2]?
end;

Yes.


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

Reply via email to