[meld] filediff: Explicitly remove file monitor on comparison close (#433)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] filediff: Explicitly remove file monitor on comparison close (#433)
- Date: Sat, 8 Aug 2020 22:18:10 +0000 (UTC)
commit cc6c4a80c9290e731fb656ab533615897eef3d2a
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Aug 9 08:13:41 2020 +1000
filediff: Explicitly remove file monitor on comparison close (#433)
This shouldn't be necessary, but since we're having some widgets not
get correctly garbage collected, this works around the problems of
keeping open file handles for now.
meld/filediff.py | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 8e5246f0..7d7b3fe0 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1216,6 +1216,11 @@ class FileDiff(Gtk.VBox, MeldDoc):
meld_settings = get_meld_settings()
for h in self.settings_handlers:
meld_settings.disconnect(h)
+
+ # This is a workaround for cleaning up file monitors.
+ for buf in self.textbuffer:
+ buf.data.disconnect_monitor()
+
# TODO: This should not be necessary; remove if and when we
# figure out what's keeping MeldDocs alive for too long.
del self._cached_match
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]