diff options
author | fiaxh <git@mx.ax.lt> | 2017-11-22 21:09:39 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-11-23 01:28:29 +0100 |
commit | 64774241e587eab64b10a0c35dd455f6a2288a55 (patch) | |
tree | e019252bce51a684dc1c97c97d897a193715d360 /main/src/ui/conversation_summary/conversation_view.vala | |
parent | 9165c4db278b2d3da636d53e89c3b80cff66977f (diff) | |
download | dino-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.vala | 8 |
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(); }); } } |