diff options
Diffstat (limited to 'src/glibext')
-rw-r--r-- | src/glibext/gbuffercache.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/glibext/gbuffercache.c b/src/glibext/gbuffercache.c index e4ddf06..8d02dd8 100644 --- a/src/glibext/gbuffercache.c +++ b/src/glibext/gbuffercache.c @@ -609,26 +609,24 @@ static void g_buffer_cache_dispose(GBufferCache *cache) cache_info *info; /* Accès direct à une ligne */ size_t j; /* Boucle de parcours #2 */ - if (cache->content != NULL) - g_object_unref(G_OBJECT(cache->content)); + g_clear_object(&cache->content); for (i = 0; i < cache->used; i++) { info = &cache->lines[i]; if (info->count == 1) - g_object_unref(G_OBJECT(info->generator.instance)); + g_clear_object(&info->generator.instance); else for (j = 0; j < info->count; j++) - g_object_unref(G_OBJECT(info->generators[j].instance)); + g_clear_object(&info->generators[j].instance); - if (info->line) - g_object_unref(G_OBJECT(info->line)); + g_clear_object(&info->line); } - g_object_unref(G_OBJECT(cache->tracker)); + g_clear_object(&cache->tracker); G_OBJECT_CLASS(g_buffer_cache_parent_class)->dispose(G_OBJECT(cache)); |