Home Dashboard Directory Help
Search

CMFCOutlookBarTabCtrl leak by JonnoJ


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 717992
Opened: 1/11/2012 4:33:28 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

In the CMFCOutlookBarTabCtrl::RebuildToolbar function there is a call to ExtractIcon but the class doesn't release the handle.

The amount of unreleased gdi handles can increase dramatically when resizing the window.
(OnSize->RecalcLayout->RebuildToolbar)

It can cause a nasty crash when the gdi handles reach 10000.
Details
Sign in to post a comment.
Posted by JonnoJ on 8/21/2012 at 6:18 AM
Sorry my mistake.
I wasn't looking in the right place.

Too bad you can't delete posts.
Posted by JonnoJ on 8/21/2012 at 6:08 AM
Hello,

I thought the issue would have been fixed in the release of Visual Studio 2012, however I noticed that there is still handle leakage.

I was wondering when will the fix be integrated into Visual Studio?

Thanks in advance.
Posted by Microsoft on 1/17/2012 at 11:39 AM
Hello,

Thanks for the report. This issue has been fixed in MFC for the next major release of Visual Studio.

Pat Brenner
Visual C++ Libraries Development
Posted by MS-Moderator09 [Feedback Moderator] on 1/12/2012 at 1:20 AM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 1/11/2012 at 4:43 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by JonnoJ on 1/11/2012 at 4:36 AM
Inherit from CMFCOutlookBarTabCtrl and override the RecalcLayout and GetTabHicon.
Override the vtable of the actual CMFCOutlookBarTabCtrl with the one containing the overrides.

Keep track on the allocated icon handles and release them when appropriate.