<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace">If I have this:</div><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">
var</div><div class="gmail_default" style="font-family:courier new,monospace"> a2: array of array of Integer;</div><div class="gmail_default" style="font-family:courier new,monospace"> i, j: Integer;</div><div class="gmail_default" style="font-family:courier new,monospace">
begin</div><div class="gmail_default" style="font-family:courier new,monospace"> SetLength(a2, 3);</div><div class="gmail_default" style="font-family:courier new,monospace"> for i := 0 to 2 do begin</div><div class="gmail_default" style="font-family:courier new,monospace">
SetLength(a[i], 3);</div><div class="gmail_default" style="font-family:courier new,monospace"> for j := 0 to 2 do a[i][j] := 1;</div><div class="gmail_default" style="font-family:courier new,monospace"> end;</div>
<div class="gmail_default" style="font-family:courier new,monospace"> a2 := nil; <-- will this free all memory of a[0]...a[2]?</div><div class="gmail_default" style="font-family:courier new,monospace">end;</div><div class="gmail_default" style="font-family:courier new,monospace">
<br></div><div class="gmail_default" style="font-family:courier new,monospace">Thanks!</div><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">
Xiangrong</div></div>