Re: How do I use BDS 2006 CodeGuard?


2007-02-28 12:38:23 AM
cppbuilder15
On Feb 26, 12:15 pm, "Larry Griffiths" < XXXX@XXXXX.COM >wrote:
Quote
I am conducting a CodeGuard test with the new BDS 2006 C++ Compiler.

I go to Project/Options/C++ Compiler (bcc32)/CodeGuard compile support
and check all the boxes. ( -vG, -vG0, -vG1, -vG2, -vG3, -vGc, -vGt
and -vGd ).

I build my project.

I go to Tool/CodeGuard Configuration and make sure "Enable" is checked.
Resource Leaks is also checked.

I run my application (F9) and trace the following statements and see that
CG_GDA_EGY and CG_DA_EPY are called at the assembler level.

private:

TList* FCodeGuartList;

code:

TList* List = new TList;
FCodeGuardList = new TList;

When I exit the application under BDS 2006 I am not getting any indication
of resource leaks.

What do I still need to do to get messages from CodeGuard indicating that
memory leaks have occured?
Great Question Larry!
First be sure that you are using Debug Linking (Full Debug
information -v) and NOT using the dynamic RTL (Use dynamic RTL)
the Dynamic RTL is NOT compiled with Codeguard so you cannot get
CodeGuard resource leaks reported with Dynamic RTL enabled.
If you do
new char[256]
then it will report in codeguard no matter what your link settings are
as this code is compiled with code-guard when you compile your
project.
Hope this Helps!