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

Unified Diff: chrome/browser/chromeos/input_method/candidate_window.cc

Issue 7741038: Fix a memory leak in the IME candidate window of Chrome OS (2nd try). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« 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: chrome/browser/chromeos/input_method/candidate_window.cc
diff --git a/chrome/browser/chromeos/input_method/candidate_window.cc b/chrome/browser/chromeos/input_method/candidate_window.cc
index 46ee983e73b9825a29b388eba864dcf7df9e0ffa..8d66df33505c284e05b75a7ad5b147d862475fab 100644
--- a/chrome/browser/chromeos/input_method/candidate_window.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop.h"
#include "base/observer_list.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
@@ -1048,6 +1049,8 @@ void CandidateWindowView::MaybeInitializeCandidateViews(
// Clear the existing candidate_views if any.
for (size_t i = 0; i < candidate_views_.size(); ++i) {
candidate_area_contents->RemoveChildView(candidate_views_[i]);
+ // Delete the view after getting out the current message loop iteration.
+ MessageLoop::current()->DeleteSoon(FROM_HERE, candidate_views_[i]);
}
candidate_views_.clear();
« 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