var
i:integer;
AA:array of array of Integer;
begin
try
Setlength(AA,2);
SetLength(AA[0],3);
SetLength(AA[1],3);
AA[0][0]:=1;
AA[0][1]:=2;
AA[0][2]:=3;
AA[1][0]:=4;
AA[1][1]:=5;
AA[1][2]:=6;
finally
//释放内存
for i:=0 to length(AA)-1 do begin
SetLength(AA,0);
end;
SetLength(AA,0);
end;
end;