From 24f4d9249267f8b93fd2b9075ffe7aead079afd9 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Thu, 5 Mar 2015 07:41:18 -0500 Subject: Fix out-of-control render cache from dominating all available memory (bzr r13966) --- src/display/drawing.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/display/drawing.cpp') diff --git a/src/display/drawing.cpp b/src/display/drawing.cpp index 6e728b03d..eadd7e528 100644 --- a/src/display/drawing.cpp +++ b/src/display/drawing.cpp @@ -210,9 +210,9 @@ Drawing::_pickItemsForCaching() } std::set to_cache; - for (i = _candidate_items.begin(); i != _candidate_items.end(); ++i) { - i->item->setCached(true); - to_cache.insert(i->item); + for (CandidateList::iterator j = _candidate_items.begin(); j != i; ++j) { + j->item->setCached(true); + to_cache.insert(j->item); } // Everything which is now in _cached_items but not in to_cache must be uncached // Note that calling setCached on an item modifies _cached_items -- cgit v1.2.3