summaryrefslogtreecommitdiffstats
path: root/base/observer_list_unittest.cc
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-05 19:40:53 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-05 19:40:53 +0000
commitbd60d73f534a1b568f7460b5ef8f4307aeb178d2 (patch)
treedf5b3647213c5df9291986ac80d4da43444cf34c /base/observer_list_unittest.cc
parent6b54712e0e5b2edc5b6aea70c92d6f844c56ad5a (diff)
downloadchromium_src-bd60d73f534a1b568f7460b5ef8f4307aeb178d2.zip
chromium_src-bd60d73f534a1b568f7460b5ef8f4307aeb178d2.tar.gz
chromium_src-bd60d73f534a1b568f7460b5ef8f4307aeb178d2.tar.bz2
Fix some leaks in observer_list_unittest
Review URL: http://codereview.chromium.org/16505 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/observer_list_unittest.cc')
-rw-r--r--base/observer_list_unittest.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/observer_list_unittest.cc b/base/observer_list_unittest.cc
index 1d3668d..9413561 100644
--- a/base/observer_list_unittest.cc
+++ b/base/observer_list_unittest.cc
@@ -101,7 +101,7 @@ class AddRemoveThread : public PlatformThread::Delegate,
factory_ = new ScopedRunnableMethodFactory<AddRemoveThread>(this);
}
- ~AddRemoveThread() {
+ virtual ~AddRemoveThread() {
delete factory_;
}
@@ -113,6 +113,7 @@ class AddRemoveThread : public PlatformThread::Delegate,
//LOG(ERROR) << "Loop 0x" << std::hex << loop_ << " done. " << count_observes_ << ", " << count_addtask_;
delete loop_;
loop_ = reinterpret_cast<MessageLoop*>(0xdeadbeef);
+ delete this;
}
// This task just keeps posting to itself in an attempt