Hello,

The test:

=== begin code ===

program project1;

uses
  heaptrc,
  SysUtils;

  function _Finalize: boolean;
  begin
    WriteLn('END');
    Result := True;
  end;

begin
  WriteLn('START');
  AddTerminateProc(@_Finalize);
  WriteLn('END 1');
  Sleep(1000);
  DeleteFile('HT.TXT');
  SetHeapTraceOutput('HT.TXT');
end.

=== end code ===

The result:

=== begin trace ===
Heap dump by heaptrc unit
50 memory blocks allocated : 1226/1344
49 memory blocks freed     : 1218/1336
1 unfreed memory blocks : 8
True heap size : 196608 (112 used in System startup)
True free heap : 196416
Should be : 196424
Call trace for block $0018F150 size 8
  $BAADF00D
  $BAADF00D
  $BAADF00D
  $BAADF00D
  $BAADF00D
  $BAADF00D
  $BAADF00D
  $BAADF00D
=== end trace ===

The leak is returned even calling the CallTerminateProcs function.

I did something wrong or is it really a leak?

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to