[gegl] TileHandlerChain: Simplify dispose



commit bdb8d90566857fcafb1cc4b92a06b23e3f51080f
Author: Michael Henning <drawoc darkrefraction com>
Date:   Sun Feb 2 14:26:05 2014 -0500

    TileHandlerChain: Simplify dispose

 gegl/buffer/gegl-tile-handler-chain.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-handler-chain.c b/gegl/buffer/gegl-tile-handler-chain.c
index 7e6842f..295cb72 100644
--- a/gegl/buffer/gegl-tile-handler-chain.c
+++ b/gegl/buffer/gegl-tile-handler-chain.c
@@ -33,17 +33,8 @@ static void
 gegl_tile_handler_chain_dispose (GObject *object)
 {
   GeglTileHandlerChain *tile_handler_chain = GEGL_TILE_HANDLER_CHAIN (object);
-  GSList *iter = tile_handler_chain->chain;
 
-  while (iter)
-    {
-      tile_handler_chain->chain = iter->next;
-
-      g_object_unref (iter->data);
-      g_slist_free_1 (iter);
-
-      iter = tile_handler_chain->chain;
-    }
+  g_slist_free_full (tile_handler_chain->chain, g_object_unref);
 
   G_OBJECT_CLASS (gegl_tile_handler_chain_parent_class)->dispose (object);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]