Plug a memory leak

We were leaking cairo regions every time we draw.
This commit is contained in:
Matthias Clasen 2014-10-14 22:46:26 -04:00
parent ccf6507f6a
commit f99cbdf49f

View File

@ -3640,6 +3640,7 @@ gdk_window_process_updates_internal (GdkWindow *window)
cairo_region_t *swap_region = cairo_region_copy (expose_region); cairo_region_t *swap_region = cairo_region_copy (expose_region);
cairo_region_subtract (swap_region, window->active_update_area); cairo_region_subtract (swap_region, window->active_update_area);
draw_ugly_color (window, swap_region, 1); draw_ugly_color (window, swap_region, 1);
cairo_region_destroy (swap_region);
/* Make sure we see the red invalid area before redrawing. */ /* Make sure we see the red invalid area before redrawing. */
gdk_display_sync (gdk_window_get_display (window)); gdk_display_sync (gdk_window_get_display (window));
@ -3654,6 +3655,8 @@ gdk_window_process_updates_internal (GdkWindow *window)
impl_class->process_updates_recurse (window, expose_region); impl_class->process_updates_recurse (window, expose_region);
gdk_window_append_old_updated_area (window, window->active_update_area); gdk_window_append_old_updated_area (window, window->active_update_area);
cairo_region_destroy (expose_region);
} }
cairo_region_destroy (window->active_update_area); cairo_region_destroy (window->active_update_area);