diff options
author | fiaxh <git@lightrise.org> | 2023-02-27 23:38:31 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2023-02-27 23:38:31 +0100 |
commit | fb799e3ba8313ff2da53d9d5c34f8421f164cbf1 (patch) | |
tree | 2de44bcf7a01917610d9ad96396da3df5a314ae9 /main/src/ui/conversation_content_view/file_widget.vala | |
parent | c526848098ff187615f0be0b531c9b45644d0e03 (diff) | |
download | dino-fb799e3ba8313ff2da53d9d5c34f8421f164cbf1.tar.gz dino-fb799e3ba8313ff2da53d9d5c34f8421f164cbf1.zip |
Fix some memory leaks
Diffstat (limited to 'main/src/ui/conversation_content_view/file_widget.vala')
-rw-r--r-- | main/src/ui/conversation_content_view/file_widget.vala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/main/src/ui/conversation_content_view/file_widget.vala b/main/src/ui/conversation_content_view/file_widget.vala index 543eb169..785acf7d 100644 --- a/main/src/ui/conversation_content_view/file_widget.vala +++ b/main/src/ui/conversation_content_view/file_widget.vala @@ -135,6 +135,17 @@ public class FileWidget : SizeRequestBox { } return false; } + + public override void dispose() { + if (default_widget_controller != null) default_widget_controller.dispose(); + default_widget_controller = null; + if (content != null) { + content.unparent(); + content.dispose(); + content = null; + } + base.dispose(); + } } public class FileWidgetController : Object { |