Jeschke
14 years agoNew Contributor
Does AQtime show too much live objects when using dynamical array in D7?
I initialised some dynamical arrays and deinitialized them again and agian.
with setlength in Delphi 7.
Memory usage (I think this is "live size" in the result page under classes data ) increases unbelievably.
No difference if I make a snapshot or when I close applicatoion.
When I press button1 in The application for initializing 2 dyn arrays of double with 1Mio *8 bytes each and unrelease again , there an extra of 49k live
remaining.
When I press Button 3 (repeatedly setlength( random size) and release by setlength(0) Aqtime finds some 100MB of live space, but taskmanager of Windows XP shows only memoryusage of 3...18MB ending up after finish at 3MB.
What do IO do wrong?
procedure TForm1.Button1Click(Sender: TObject);
var r1,r0:array of double;
begin
setlength(r0,1000000);
setlength(r1,1000000);
setlength(r0,0);
setlength(r1,0);
end;
procedure TForm1.Button3Click(Sender: TObject);
var r:array[0..3] of array of double;i,j:integer;
begin
for j:=0 to 100000 do begin
for i:=0 to 3 do
setlength(r,random(1000000));
for i:=0 to 3 do
setlength(r,random(0));
if j mod 1000=0 then begin
if j mod 2000=0 then caption:='/'
else caption:='|'
application.ProcessMessages;
end;
end;
for i:=0 to 3 do
setlength(r,random(0));
caption:='fertig';
end;