mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
Plug a mem leak
GtkWindow was leaking the startup_id, reported in bug 593317.
This commit is contained in:
parent
44adf811ea
commit
2105d946cf
@ -4400,6 +4400,7 @@ static void
|
||||
gtk_window_finalize (GObject *object)
|
||||
{
|
||||
GtkWindow *window = GTK_WINDOW (object);
|
||||
GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (window);
|
||||
GtkMnemonicHash *mnemonic_hash;
|
||||
|
||||
g_free (window->title);
|
||||
@ -4427,10 +4428,10 @@ gtk_window_finalize (GObject *object)
|
||||
}
|
||||
|
||||
if (window->screen)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (window->screen,
|
||||
gtk_window_on_composited_changed, window);
|
||||
}
|
||||
|
||||
g_free (priv->startup_id);
|
||||
|
||||
G_OBJECT_CLASS (gtk_window_parent_class)->finalize (object);
|
||||
}
|
||||
@ -4602,6 +4603,7 @@ gtk_window_map (GtkWidget *widget)
|
||||
if (!startup_id_is_fake (priv->startup_id))
|
||||
gdk_notify_startup_complete_with_id (priv->startup_id);
|
||||
|
||||
g_free (priv->startup_id);
|
||||
priv->startup_id = NULL;
|
||||
}
|
||||
else if (!sent_startup_notification)
|
||||
|
Loading…
Reference in New Issue
Block a user