aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_summary/conversation_view.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-11-22 21:09:39 +0100
committerfiaxh <git@mx.ax.lt>2017-11-23 01:28:29 +0100
commit64774241e587eab64b10a0c35dd455f6a2288a55 (patch)
treee019252bce51a684dc1c97c97d897a193715d360 /main/src/ui/conversation_summary/conversation_view.vala
parent9165c4db278b2d3da636d53e89c3b80cff66977f (diff)
downloaddino-64774241e587eab64b10a0c35dd455f6a2288a55.tar.gz
dino-64774241e587eab64b10a0c35dd455f6a2288a55.zip
Fix memory leak
Diffstat (limited to 'main/src/ui/conversation_summary/conversation_view.vala')
-rw-r--r--main/src/ui/conversation_summary/conversation_view.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/ui/conversation_summary/conversation_view.vala b/main/src/ui/conversation_summary/conversation_view.vala
index 5aeb27fc..15a86ca7 100644
--- a/main/src/ui/conversation_summary/conversation_view.vala
+++ b/main/src/ui/conversation_summary/conversation_view.vala
@@ -84,9 +84,10 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
if (skeleton.items.size > 1) {
skeleton.remove_meta_item(item);
} else {
- main.remove(widgets[item]);
+ widgets[item].destroy();
widgets.unset(item);
- item_skeletons.remove(item_item_skeletons[item]);
+ skeleton.destroy();
+ item_skeletons.remove(skeleton);
item_item_skeletons.unset(item);
}
meta_items.remove(item);
@@ -233,7 +234,8 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
meta_after_items.clear();
item_skeletons.clear();
item_item_skeletons.clear();
- main.@foreach((widget) => { main.remove(widget); });
+ widgets.clear();
+ main.@foreach((widget) => { widget.destroy(); });
}
}