Skip to content

[console] console application leak origin detail not logged #89

Description

@dcabale
  1. consider this simple console application project:

program Project7;

{$APPTYPE CONSOLE}
{$INCLUDE .\FastMM4Options.inc}

{$R *.res}

uses
FastMM4
, System.SysUtils
;

begin
ReportMemoryLeaksOnShutdown := true;
try
try
{ TODO -oUser -cConsole Main : Insert code here }
TObject.Create;
finally
end;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.

  1. enabling FullDebugMode in FastMM4Options.inc, the resulting Project7_MemoryManager_EventLog.txt is as follows:
    --------------------------------2021/10/11 10:35:34--------------------------------
    A memory block has been leaked. The size is: 12.

This block was allocated by thread 0x2C90, and the stack trace (return addresses) at the time was:
40707E [System.pas][System][@getmem$qqri][4843]
4088AB [System.pas][System][TObject.NewInstance][17861]
408FD2 [System.pas][System][@ClassCreate$qqrpvzc][19251]
408990 [System.pas][System][TObject.Create][17920]
40A1C0 [System.pas][System][InitUnits$qqrv][23832]
4F9986
76A00419 [BaseThreadInitThunk]
77B372AD [RtlGetAppContainerNamedObjectPath]
77B3727D [RtlGetAppContainerNamedObjectPath]

The block is currently used for an object of class: System.TObject
The allocation number is: 537
...

  1. Note the absence of reference to the Project7.dpr source code, in the line referenced by the 4F9986 memory address

-> Did I miss a setting in FastMM4Options.inc ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions