Memory Leak Detection by Enabling CodeGaurd

Platform Supported:

  • Win32
  • Win64

Under Project ➤ Options:

  • Under C++ Compiler ➤ Debugging, turn the "Enable Codegaurd" to true.
  • Under C++ Linker, turn "Link with Dynamic RTL" to true, and check "Full debug information" to true.
  • Under Package ➤ Runtime Package, uncheck "Link with runtime package" to false.

Then, you can configure the CodeGuard by clicking Tools ➤ CodeGuard Configuration.

Rebuild the project and then execute the program. If any error occurs, the CodeGuard will show a message when the program exits.

CodeGuardError

An .cgl ( <ProjectName>.cgl ) file will be generated in the project directory that will contain the CodeGuard information.