diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-21 22:44:21 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-21 22:44:21 +0000 |
commit | 3b8a7f8e37e223f3cfbdb6893a3e372ba1e72bc2 (patch) | |
tree | dbcc9e25653efaa6d7b3fd0b646f56123f72f8f2 /app/win | |
parent | 294b014b3743b8a359d423ab238d2ea2872cf629 (diff) | |
download | chromium_src-3b8a7f8e37e223f3cfbdb6893a3e372ba1e72bc2.zip chromium_src-3b8a7f8e37e223f3cfbdb6893a3e372ba1e72bc2.tar.gz chromium_src-3b8a7f8e37e223f3cfbdb6893a3e372ba1e72bc2.tar.bz2 |
Attempt 2 at:
Converts usage of SetProp/GetProp to a map. Even after making sure we
clean up props we still leak in a handful of cases that are causing
test grief. By and large our usage of properties is for inside the
application, so that a map works fine.
BUG=61528 44991
TEST=none
TBR=cpu@chromium.org
Review URL: http://codereview.chromium.org/5144005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/win')
-rw-r--r-- | app/win/scoped_prop.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/win/scoped_prop.h b/app/win/scoped_prop.h index 14e6a6a..c309e52 100644 --- a/app/win/scoped_prop.h +++ b/app/win/scoped_prop.h @@ -18,6 +18,12 @@ namespace win { // cleanup. ScopedProp must be destroyed before the window is destroyed, else // you're going to leak a property, which could lead to failure to set a // property later on. +// +// *WARNING* +// SetProp is very fragile. SetProp makes use of a finite chunk of memory that +// is very easy to exhaust. Unless you need to share a property across process +// boundaries you should instead use ViewProp, which does not cause leaks at the +// window manager. class ScopedProp { public: // Registers the key value pair for the specified window. ScopedProp does not |