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

Issue 160150: Add clean-up code to SetAppIdForWindow().... (Closed)

Created:
11 years, 5 months ago by Hironori Bono
Modified:
9 years, 7 months ago
Reviewers:
brg
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Add clean-up code to SetAppIdForWindow(). This is a follow-up change for r21596. It seems this change forgot calling pps->Release() and PropVariantClear(&pv). (InitPropVariantFromString() calls SHStrDupW() to create a copy of its input string, so we have to call PropVariantClear() and delete it.) To avoid an object leak and a memory leak, this change uses ScopedComPtr<IPropertyStore> to call Release() in its destructor and call PropVariantClear() to clean-up PROPVARIANT. (My JumpList class uses a class which encapsulates PROPVARIANT. We should move the class to win_util?) BUG=none TEST=none (Run Chromium on purify running on Windows 7.) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21830

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -4 lines) Patch
M app/win_util.cc View 1 2 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Hironori Bono
11 years, 5 months ago (2009-07-27 06:30:06 UTC) #1
brg
11 years, 4 months ago (2009-07-27 16:40:52 UTC) #2
LGTM.

Good catch.

Powered by Google App Engine
This is Rietveld 408576698