[geary] Fix leaking inline composer widgets



commit 5f769ca3e22db1f805adfe6e9452ee8ff7156dd1
Author: Michael Gratton <mike vee net>
Date:   Sun Feb 10 21:08:42 2019 +1100

    Fix leaking inline composer widgets

 src/client/conversation-viewer/conversation-list-box.vala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/client/conversation-viewer/conversation-list-box.vala 
b/src/client/conversation-viewer/conversation-list-box.vala
index c34687e9..259ef662 100644
--- a/src/client/conversation-viewer/conversation-list-box.vala
+++ b/src/client/conversation-viewer/conversation-list-box.vala
@@ -707,7 +707,9 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
 
         ComposerRow row = new ComposerRow(embed);
         row.enable_should_scroll();
-        row.should_scroll.connect(() => { scroll_to(row); });
+        // Use row param rather than row var from closure to avoid a
+        // circular ref.
+        row.should_scroll.connect((row) => { scroll_to(row); });
         add(row);
 
         embed.composer.draft_id_changed.connect((id) => { this.draft_id = id; });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]