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:
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:
|