[clutter] stage: Make sure to free any pending queued redraws if we have any
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] stage: Make sure to free any pending queued redraws if we have any
- Date: Sun, 24 Jun 2012 21:30:34 +0000 (UTC)
commit 6c4abde369b015489d98d07c7c24d5a8bf870d5f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Jun 24 13:29:22 2012 -0400
stage: Make sure to free any pending queued redraws if we have any
This fixes a memory leak when someone creates a stage and then immediately
destroys it.
clutter/clutter-stage.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index 6598070..9e3bb8b 100644
--- a/clutter/clutter-stage.c
+++ b/clutter/clutter-stage.c
@@ -212,6 +212,7 @@ static guint stage_signals[LAST_SIGNAL] = { 0, };
static const ClutterColor default_stage_color = { 255, 255, 255, 255 };
static void _clutter_stage_maybe_finish_queue_redraws (ClutterStage *stage);
+static void free_queue_redraw_entry (ClutterStageQueueRedrawEntry *entry);
static void
clutter_stage_real_add (ClutterContainer *container,
@@ -1813,6 +1814,10 @@ clutter_stage_dispose (GObject *object)
clutter_actor_remove_all_children (CLUTTER_ACTOR (object));
+ g_list_free_full (priv->pending_queue_redraws,
+ (GDestroyNotify) free_queue_redraw_entry);
+ priv->pending_queue_redraws = NULL;
+
/* this will release the reference on the stage */
stage_manager = clutter_stage_manager_get_default ();
_clutter_stage_manager_remove_stage (stage_manager, stage);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]