Memory Leaks Limits

Top  Previous 

The EurekaLog Memory Leaks Detection has same limits derives from its internal structure.

 

EurekaLog detects the memory leaks at the program exit, so at this state the program has just freed all its non-static resources (resources allocated at run-time as Object created with the Create method, variables allocated with the GetMem function, or constants arrays).

 

This technique generating the following limitations:

 

 

1.        currently this feature is available only in Delphi (not C++Builder);

 

2.        the Leak report automatically hide the Assembler and CPU sections;

 

3.        during the Leaks handling EurekaLog did not execute its events (this because all the needed memory resources are just freed);

 

4.        a little performances decreasing (no more that about 5%);

 

5.        a little memory usage increasing (about 300 bytes for every memory allocations);
 
6.        EurekaLog can catches a max of 1024 leaks (to avoid the creation of a too BIG report file);

 

7.        EurekaLog isn't able to catches memory leaks in projects compiled with Run-Time Packages.

 

 

SUGGESTION:

It's possible customize the EurekaLog options, related to the Leaks detection, before the program exit (using an unit "finalization" section, a TForm.OnDestroy event, or just putting it at the end of the project source code).

 

EXAMPLE:

 

program Project1;

 

uses

  ExceptionLog,

  ECore,  // Needed unit

  ETypes, // Needed unit

  Forms,

  Unit1 in 'Unit1.pas' {Form1};

 

{$R *.res}

 

begin

  Application.Initialize;

  Application.CreateForm(TForm1, Form1);

  Application.Run;

 

  // EurekaLog customization (for the Leaks Detection)...

  CurrentEurekaLogOptions.EMailSendMode  := esmSMTPServer;

  CurrentEurekaLogOptions.EMailSubject   := 'BUG Report';

  CurrentEurekaLogOptions.EMailMessage   := 'This is a BUG Report.';

  CurrentEurekaLogOptions.EMailAddresses := 'support@yoursite.com';

end.