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

Unified Diff: dbus/property_unittest.cc

Issue 10454083: dbus: Fix a bunch of memory leaks in dbus_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dbus/values_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/property_unittest.cc
diff --git a/dbus/property_unittest.cc b/dbus/property_unittest.cc
index bd37a53099d2fedb9aa479dc3379235ddcb03a61..052d98bf69e8a50141458a63ea4914be713428cd 100644
--- a/dbus/property_unittest.cc
+++ b/dbus/property_unittest.cc
@@ -76,9 +76,10 @@ class PropertyTest : public testing::Test {
ASSERT_TRUE(bus_->HasDBusThread());
// Create the properties structure
- properties_ = new Properties(object_proxy_,
- base::Bind(&PropertyTest::OnPropertyChanged,
- base::Unretained(this)));
+ properties_.reset(new Properties(
+ object_proxy_,
+ base::Bind(&PropertyTest::OnPropertyChanged,
+ base::Unretained(this))));
properties_->ConnectSignals();
properties_->GetAll();
}
@@ -141,7 +142,7 @@ class PropertyTest : public testing::Test {
scoped_ptr<base::Thread> dbus_thread_;
scoped_refptr<dbus::Bus> bus_;
dbus::ObjectProxy* object_proxy_;
- Properties* properties_;
+ scoped_ptr<Properties> properties_;
scoped_ptr<dbus::TestService> test_service_;
// Properties updated.
std::vector<std::string> updated_properties_;
« no previous file with comments | « no previous file | dbus/values_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698