[ wxwindows-Bugs-1719182 ] Memory leaks when MFC with wxWidgets Debug DLL and using PCH

SourceForge.net noreply at sourceforge.net
Thu Dec 13 09:15:23 PST 2007


Bugs item #1719182, was opened at 2007-05-15 12:22
Message generated for change (Comment added) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1719182&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMSW specific
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Mareq (mareqq)
Assigned to: Julian Smart (juliansmart)
Summary: Memory leaks when MFC with wxWidgets Debug DLL and using PCH

Initial Comment:
Take a look at
http://wxforum.shadonet.com/viewtopic.php?t=14031&highlight=

----------------------------------------------------------------------

>Comment By: Vadim Zeitlin (vadz)
Date: 2007-12-13 18:15

Message:
Logged In: YES 
user_id=71618
Originator: NO

Seems to have been fixed, thanks to Kenneth and troelsk!

----------------------------------------------------------------------

Comment By: troelsk (troelsk)
Date: 2007-12-13 17:15

Message:
Logged In: YES 
user_id=1290727
Originator: NO


Good! Perhaps you could close this bug.
Regards



----------------------------------------------------------------------

Comment By: Mareq (mareqq)
Date: 2007-12-13 15:15

Message:
Logged In: YES 
user_id=1792574
Originator: YES

After reading the article it is absolutely clear :).
Thank you.

BTW: In my case, it was about mfc80[u][d].lib.

----------------------------------------------------------------------

Comment By: Mareq (mareqq)
Date: 2007-12-13 15:14

Message:
Logged In: YES 
user_id=1792574
Originator: YES

After reading the article it is absolutely clear :).
Thank you.

BTW: In my case, it was about mfc80[u][d].lib.

----------------------------------------------------------------------

Comment By: troelsk (troelsk)
Date: 2007-12-13 13:00

Message:
Logged In: YES 
user_id=1290727
Originator: NO


Kenneth Porter found a fix, in your project (or samples/mfc) just list
mfc42ud.lib (Unicode)  or mfc42d.lib (Ansi) as the first link module. This
makes the 'leaks' go away.
http://article.gmane.org/gmane.comp.lib.wxwindows.general/57271


----------------------------------------------------------------------

Comment By: troelsk (troelsk)
Date: 2007-05-16 13:46

Message:
Logged In: YES 
user_id=1290727
Originator: NO


No so good. 
I saw these 'leaks' too with MSVC6 (bug #1554728). 
The leaks appeared to go away with MSVC2003. 
Now it looks like they're back, with MSVC2005. 
(It'll be causing much agony here, when we eventually upgrade from
MSVC2003 to 2005)

>I think these are not real memory leaks

I agree. It looks like a bug in the MSVC2005 debugger.


----------------------------------------------------------------------

Comment By: Mareq (mareqq)
Date: 2007-05-16 08:43

Message:
Logged In: YES 
user_id=1792574
Originator: YES

Re 2.:

I have checked it. These memory leaks are shown also when running
samples/mfc.

Steps to reproduce:
1. Install wxMSW-2.8.3.
2. Open build/msw/wx_dll.dsw with VS2005. Files will be converted to
VS2005 format (wx_dll.sln, *.vcproj, ...).
3. Build wxMSW as "DLL Debug".
4. Open samples/mfc/mfc.dsw with VS2005 (again converted to VS2005
format).
5. Build and run mfc sample as "DLL Debug".
6. When the sample finishes, a lot of memory leaks are shown in the trace
window of VS2005.

I think these are not real memory leaks, but some interference of MFC and
wxWidgets that causes the memory leak detector does not work correctly
(because of _DEBUG_NEW or new or ... macro redefinition). I am not sure if
this is the reason.

----------------------------------------------------------------------

Comment By: Mareq (mareqq)
Date: 2007-05-15 15:28

Message:
Logged In: YES 
user_id=1792574
Originator: YES

1.
Sorry, I made mistake when setting the category (I posted more Win CE
related issues, so this mistake occured).

2.
I will check it.


----------------------------------------------------------------------

Comment By: troelsk (troelsk)
Date: 2007-05-15 12:49

Message:
Logged In: YES 
user_id=1290727
Originator: NO

- Did you really mean category WinCE? (probably not)
- Do you see the leak when running samples/mfc? (probably not - in this
case please close this bug again)

/Troels


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1719182&group_id=9863




More information about the wx-dev mailing list