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

Unified Diff: mojo/services/view_manager/view_manager_connection.cc

Issue 309793007: Fixes leak in ViewManagerConnection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/view_manager_connection.cc
diff --git a/mojo/services/view_manager/view_manager_connection.cc b/mojo/services/view_manager/view_manager_connection.cc
index 6b7a8c8f6eb34614fdab7e46be9c88f9d6a35120..08831baa99914c82e9b335db2ac81b670d9147a1 100644
--- a/mojo/services/view_manager/view_manager_connection.cc
+++ b/mojo/services/view_manager/view_manager_connection.cc
@@ -58,11 +58,11 @@ ViewManagerConnection::~ViewManagerConnection() {
this, root_node_manager_,
RootNodeManager::CHANGE_TYPE_ADVANCE_SERVER_CHANGE_ID, true);
while (!node_map_.empty()) {
- Node* node = node_map_.begin()->second;
+ scoped_ptr<Node> node(node_map_.begin()->second);
Node* parent = node->GetParent();
const NodeId node_id(node->id());
if (parent)
- parent->Remove(node);
+ parent->Remove(node.get());
root_node_manager_->ProcessNodeDeleted(node_id);
node_map_.erase(NodeIdToTransportId(node_id));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698