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

Unified Diff: ash/root_window_controller.cc

Issue 10854153: Fix memory leak on Chromium OS Heapcheck and Chromium OS (valgrind) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 15fba6b576d0d02381e576ad0bd48c6d49d53f1a..bf7060af1fc78b9947d2081a659535bd73b25734 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -285,6 +285,10 @@ void RootWindowController::CreateContainers() {
void RootWindowController::CloseChildWindows() {
// Close background widget first as it depends on tooltip.
+ if (root_window_->GetProperty(internal::kComponentWrapper) &&
+ (root_window_->GetProperty(internal::kWindowDesktopComponent) !=
+ root_window_->GetProperty(internal::kComponentWrapper)->component()))
+ delete root_window_->GetProperty(internal::kComponentWrapper)->component();
root_window_->SetProperty(kWindowDesktopComponent,
static_cast<DesktopBackgroundWidgetController*>(NULL));
root_window_->SetProperty(kComponentWrapper,

Powered by Google App Engine
This is Rietveld 408576698