Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Issue 7978021: Fix memory leak on menu (Closed)

Created:
9 years, 3 months ago by yosin_UTC9
Modified:
9 years, 3 months ago
CC:
chromium-reviews, dhollowa
Visibility:
Public.

Description

MenuConfig::Create passes HFONT to Font ctor but this HFONT isn't deleted. PlatformFontWin keeps copied HFONT by InitWIthCopyOfHFONT rather than keeping passed HFONT. BUG=96872 TEST=Manual on Win7 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102241

Patch Set 1 #

Total comments: 1

Patch Set 2 : Use ScopedHFONT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -4 lines) Patch
M views/controls/menu/menu_config_win.cc View 1 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
yosin_UTC9
Hi guys, Could you review my change? This change stops leaking one GDI object (font) ...
9 years, 3 months ago (2011-09-21 06:58:19 UTC) #1
sky
LGTM
9 years, 3 months ago (2011-09-21 14:01:45 UTC) #2
sky
Can you also merge this one over to 15 too? Thanks, -Scott On Wed, Sep ...
9 years, 3 months ago (2011-09-21 14:48:27 UTC) #3
sky
LGTM with the following change. http://codereview.chromium.org/7978021/diff/1/views/controls/menu/menu_config_win.cc File views/controls/menu/menu_config_win.cc (right): http://codereview.chromium.org/7978021/diff/1/views/controls/menu/menu_config_win.cc#newcode32 views/controls/menu/menu_config_win.cc:32: HFONT font = CreateFontIndirect(&metrics.lfMenuFont); ...
9 years, 3 months ago (2011-09-21 22:31:57 UTC) #4
commit-bot: I haz the power
9 years, 3 months ago (2011-09-22 05:30:48 UTC) #5
Change committed as 102241

Powered by Google App Engine
This is Rietveld 408576698