Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Memory leaks and resource leaks?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Memory leaks and resource leaks?

 Post Reply Post Reply
Author
Message
zhou_wz View Drop Down
Groupie
Groupie


Joined: 11 December 2003
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote zhou_wz Quote  Post ReplyReply Direct Link To This Post Topic: Memory leaks and resource leaks?
    Posted: 30 October 2005 at 1:58am

I used boundchecker 6.5 to debug the any sample debug exe. such as GUI_VisualStudio7d.exe

The boundchecker reported some memory leaks such as
in CXTPPaintManager

CXTPPaintManager* CXTPPaintManager::CreateTheme(XTPPaintTheme paintTheme)
{
...
 if (paintTheme == xtpThemeOfficeXP) pInstance = new CXTPOfficeTheme();
...

it said the 'new' has memory leak...

and in some other file had same memory leak alarm....

Could anyone verify and explain it?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2005 at 1:41am

This memory will be free in

void CXTPPaintManager::Done()
 

as you can see in Visual Studio output, there are no leak reports after application terminate.

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
zhou_wz View Drop Down
Groupie
Groupie


Joined: 11 December 2003
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote zhou_wz Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2005 at 7:35pm

Yes Oleg,
I check it is a good trick to release the memory.
But I wonder why boundchecker report and visual studio not. Is it because the .dll is called?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 04 November 2005 at 12:14am

 

Have no idea. :)

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.168 seconds.