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

Unified Diff: ui/base/models/list_model.h

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-add updated clear method and write a test for weak_clear Created 8 years, 5 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: ui/base/models/list_model.h
diff --git a/ui/base/models/list_model.h b/ui/base/models/list_model.h
index 95883fc7272817ef3f3134fce982b6101644265f..dbbd689f96c481912469d0b156ecd1cffd2dfb6d 100644
--- a/ui/base/models/list_model.h
+++ b/ui/base/models/list_model.h
@@ -47,7 +47,7 @@ class ListModel {
// Removes all items from the model. This does NOT delete the items.
void RemoveAll() {
size_t count = item_count();
- items_.clear();
+ items_.weak_clear();
NotifyItemsRemoved(0, count);
}

Powered by Google App Engine
This is Rietveld 408576698