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

Unified Diff: dbus/bus.cc

Issue 8201023: Make ExportedObject and ObjectProxy own Bus as scoped_refptr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/bus_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/bus.cc
diff --git a/dbus/bus.cc b/dbus/bus.cc
index 843739ce9e218fc7f313c6536b12995a73eed6f0..fab372e56c8dde9e9d50fcd34c66ffdac2f1802c 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -293,6 +293,12 @@ void Bus::ShutdownAndBlock() {
iter->second->Detach();
}
+ // Release object proxies and exported objects here. We should do this
+ // here than in the destructor to avoid memory leaks due to cyclic
+ // reference.
stevenjb 2011/10/10 22:09:17 nit: s/here than/here rather than/ nit: s/referenc
satorux1 2011/10/11 17:24:33 Done.
+ object_proxy_table_.clear();
+ exported_object_table_.clear();
+
// Private connection should be closed.
if (connection_) {
if (connection_type_ == PRIVATE)
« no previous file with comments | « no previous file | dbus/bus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698