Root > Advanced topics > Configuring project for leaks detection > Configurations > Typical application

Typical application

Previous pageReturn to chapter overviewNext page   

This section describes leaks configuration for usual application. It can be VCL Forms application, FMX application, console application, etc. It should not use run-time packages; it should not use shared memory manager.


Configuration is very simple, as there is no additional issues. You can enable/disable leaks control in EurekaLog options (see here: memory leaks and resource leaks) - and that's it.



Detailed explanation


EurekaLog has concepts of "memory" and "resource" leaks:

"Memory leaks" - are leaks from Delphi memory manager. Those leaks appear when code uses GetMem/FreeMem or any wrapper for it (such as AllocMem, TObject.Create, strings, dynamic arrays, etc.).
"Resource leaks" - are leaks from any other allocation function (such as VirtualAlloc, HeapAlloc, etc. - see here for detailed list).


EurekaLog has EMemLeaks and EResLeaks units. EMemLeaks unit contains code to catch "memory leaks", EResLeaks unit contains code to catch "resource leaks". These units will be added to your project's uses clause (use "Project" / "View source" IDE's menu command to view it) when you enable EurekaLog for your project.


Note: EMemLeaks and EResLeaks units are always included in your EurekaLog-enabled application - even if no leaks detection is turned on in your project's options. This is not a bug. Leaks detection can be turned on at run-time (via command-line switch or just programmatically by some code), and leaks detection code should be executed first (before any other code) - that's why EMemLeaks and EResLeaks units are always included.



Using leaks detection without EurekaLog


It is possible to use leaks detection without enabling entire EurekaLog for your project - just disable EurekaLog for your project and then enable corresponding leaks detection feature (or some other memory debugging features).



See also:

Send feedback... Build date: 2018-11-26
Last edited: 2018-06-14
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.

Permanent link to this article: