mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
GDK W32: Plug a resource leak
Ensure that surfaces allocated in the impl are destroyed in finalize() https://bugzilla.gnome.org/show_bug.cgi?id=787089
This commit is contained in:
parent
4198434261
commit
174a36257f
@ -236,6 +236,23 @@ gdk_window_impl_win32_finalize (GObject *object)
|
||||
|
||||
g_free (window_impl->decorations);
|
||||
|
||||
if (window_impl->cache_surface)
|
||||
{
|
||||
cairo_surface_t_note_about_to_dereference (window_impl->cache_surface);
|
||||
cairo_surface_destroy (window_impl->cache_surface);
|
||||
window_impl->cache_surface = NULL;
|
||||
}
|
||||
|
||||
if (window_impl->cairo_surface)
|
||||
{
|
||||
cairo_surface_t_note_about_to_dereference (window_impl->cairo_surface);
|
||||
cairo_surface_destroy (window_impl->cairo_surface);
|
||||
window_impl->cairo_surface = NULL;
|
||||
}
|
||||
|
||||
g_assert (window_impl->transient_owner == NULL);
|
||||
g_assert (window_impl->transient_children == NULL);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user