From 8fe723bccb1dbcc38ec2742195cc77702f7f3f52 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Thu, 28 May 2020 17:31:31 +0200 Subject: Fix cyclic references => let objects be freed --- main/src/ui/conversation_content_view/content_populator.vala | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'main/src/ui/conversation_content_view/content_populator.vala') diff --git a/main/src/ui/conversation_content_view/content_populator.vala b/main/src/ui/conversation_content_view/content_populator.vala index 2a0f8ac1..48a9e12a 100644 --- a/main/src/ui/conversation_content_view/content_populator.vala +++ b/main/src/ui/conversation_content_view/content_populator.vala @@ -86,12 +86,7 @@ public abstract class ContentMetaItem : Plugins.MetaConversationItem { this.encryption = content_item.encryption; this.mark = content_item.mark; - WeakRef weak_item = WeakRef(content_item); - content_item.notify["mark"].connect(() => { - ContentItem? ci = weak_item.get() as ContentItem; - if (ci == null) return; - this.mark = ci.mark; - }); + content_item.bind_property("mark", this, "mark"); this.can_merge = true; this.requires_avatar = true; -- cgit v1.2.3-54-g00ecf