Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cummings <mcumming@microsoft.com>2019-08-26 21:37:30 +0300
committerMichael Cummings <mcumming@microsoft.com>2019-08-26 21:38:44 +0300
commit572f473327f676629544c9a9abb7ee645ec1c360 (patch)
tree3c19ae2dff8317fdfd88eedd016128715d7c3378 /Xwt.Gtk/Xwt.GtkBackend
parent4def77d0cfcb98d43c8bf79b9c9a4502cee1b596 (diff)
Call Destroy on Gtk objects
Diffstat (limited to 'Xwt.Gtk/Xwt.GtkBackend')
-rw-r--r--Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs1
-rw-r--r--Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs2
-rw-r--r--Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs1
3 files changed, 3 insertions, 1 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
index a2b1949e..ede03201 100644
--- a/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
@@ -316,6 +316,7 @@ namespace Xwt.GtkBackend
if (disposing && labelWidget != null) {
labelWidget.Realized -= HandleStyleUpdate;
labelWidget.StyleSet -= HandleStyleUpdate;
+ labelWidget.Destroy ();
labelWidget = null;
}
base.Dispose (disposing);
diff --git a/Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs
index 44752504..f104f7ae 100644
--- a/Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs
@@ -109,7 +109,7 @@ namespace Xwt.GtkBackend
{
Gtk.MenuItem item = ((MenuItemBackend)menuItem).MenuItem;
menu.Remove (item);
- item.Dispose ();
+ item.Destroy ();
}
public void EnableEvent (object eventId)
diff --git a/Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs
index 00edbc6a..f8e700a2 100644
--- a/Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs
@@ -280,6 +280,7 @@ namespace Xwt.GtkBackend
if (label != null) {
label.Realized -= HandleStyleUpdate;
label.StyleSet -= HandleStyleUpdate;
+ label.Destroy ();
label = null;
}
}