summaryrefslogtreecommitdiff
path: root/dash
diff options
authorThomi Richards <thomi.richards@canonical.com>2013-01-24 08:53:36 +1300
committerThomi Richards <thomi.richards@canonical.com>2013-01-24 08:53:36 +1300
commit4c3b969777277ceb85ebdee46760b2fcb17582a8 (patch)
tree04340a5c069ceb1004b7350c04dda29ad5bf275f /dash
parentab457f61ebf6a41ba987c2e3edb04a661e91a252 (diff)
Fixed memory leak.
(bzr r3057.1.2)
Diffstat (limited to 'dash')
-rw-r--r--dash/ResultView.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/dash/ResultView.cpp b/dash/ResultView.cpp
index 606950b22..f279e2e67 100644
--- a/dash/ResultView.cpp
+++ b/dash/ResultView.cpp
@@ -60,6 +60,10 @@ ResultView::ResultView(NUX_FILE_LINE_DECL)
ResultView::~ResultView()
{
+ for( auto wrapper: introspectable_children_)
+ {
+ delete wrapper.second;
+ }
introspectable_children_.clear();
for (ResultIterator it(GetIteratorAtRow(0)); !it.IsLast(); ++it)
@@ -339,7 +343,7 @@ debug::Introspectable::IntrospectableList ResultView::GetIntrospectableChildren(
{
// delete and remove the child from the map.
delete child_iter->second;
- introspectable_children_.erase(child_iter++);
+ child_iter = introspectable_children_.erase(child_iter);
}
else
{