<div dir="ltr"><div>Hello,</div><div><br></div><div>The test:</div><div><br></div><div>=== begin code ===</div><div><br></div><div><div>program project1;</div><div><br></div><div>uses</div><div> heaptrc,</div><div> SysUtils;</div><div><br></div><div> function _Finalize: boolean;</div><div> begin</div><div> WriteLn('END');</div><div> Result := True;</div><div> end;</div><div><br></div><div>begin</div><div> WriteLn('START');</div><div> AddTerminateProc(@_Finalize);</div><div> WriteLn('END 1');</div><div> Sleep(1000);</div><div> DeleteFile('HT.TXT');</div><div> SetHeapTraceOutput('HT.TXT');</div><div>end.</div></div><div><br></div><div>=== end code ===<br></div><div><br></div><div>The result:</div><div><br></div><div>=== begin trace ===<br></div><div>Heap dump by heaptrc unit<br></div><div>50 memory blocks allocated : 1226/1344</div><div>49 memory blocks freed : 1218/1336</div><div>1 unfreed memory blocks : 8</div><div>True heap size : 196608 (112 used in System startup)</div><div>True free heap : 196416</div><div>Should be : 196424</div><div>Call trace for block $0018F150 size 8</div><div> $BAADF00D</div><div> $BAADF00D</div><div> $BAADF00D</div><div> $BAADF00D</div><div> $BAADF00D</div><div> $BAADF00D</div><div> $BAADF00D</div><div> $BAADF00D</div><div>=== end trace ===<br></div><div><br></div><div>The leak is returned even calling the CallTerminateProcs function.</div><div><br></div><div>I did something wrong or is it really a leak?<br></div><div><br></div><div>Thank you!</div><div><br></div>-- <br><div class="gmail_signature">Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a></div>
</div>