Enabling CodeGaurd for you RAD Studio C++ application for memory leak detection

Just a quick note on how to enable CodeGaurd memory leak detection under Embarcadero C++ Builder.

  • The CodeGaurd setup is under Tools->CodeGuard

Under Project->Options :-

  • Under C++ Compiler->Debugging turn "Enable Codegaurd" on
  • Under C++ Linker turn off "Link with Dynamic RTL" and check "Full debug information" is turned on
  • Under Packages->Runtime Packages turn off "Link with runtime packages"

Now on exiting the application you should be shown the call stack and any resource leaks can be stepped through and are shown in the Messages window under the CodeGaurd tab.

You will also get an .cgl file generated in your application directory that will contain the same CodeGaurd information.

Filed under: Embarcadero  Tags: Radstudio, Cpp

0 Responses to “Enabling CodeGaurd for you RAD Studio C++ application for memory leak detection”

Sorry, comments have been closed for this post.