static void _cogl_atlas_free (CoglAtlas *atlas) { COGL_NOTE (ATLAS, "%p: Atlas destroyed", atlas); if (atlas->texture) cogl_object_unref (atlas->texture); if (atlas->map) _cogl_rectangle_map_free (atlas->map); g_hook_list_clear (&atlas->pre_reorganize_callbacks); g_hook_list_clear (&atlas->post_reorganize_callbacks); g_free (atlas); }
static void gth_hook_free (GthHook *hook) { g_hook_list_clear (hook->list); g_free (hook->list); g_free (hook); }
void kiro_sb_clear_sync_callbacks (KiroSb *self) { g_return_val_if_fail (self != NULL, FALSE); KiroSbPrivate *priv = KIRO_SB_GET_PRIVATE (self); g_hook_list_clear (&(priv->callbacks)); }
/* prefs_destroy_value_cb: * destroys preference value descriptor in prefs hash table */ static void prefs_destroy_value_cb(struct prefs_value * value) { g_assert(value && value->description); g_free(value->description); prefs_free_value(value->type, &value->value); g_hook_list_clear(&value->change_hook); g_free(value); }
//free a gfal's handle, safe if null void gfal_handle_freeG (gfal2_context_t handle){ if(handle == NULL) return; gfal_plugins_delete(handle, NULL); gfal_dir_handle_container_delete(&(handle->fdescs)); gfal_conf_delete(handle->conf); g_list_free(handle->plugin_opt.sorted_plugin); g_mutex_free(handle->mux_cancel); g_hook_list_clear(&handle->cancel_hooks); g_free(handle); handle = NULL; }
void cogl_pango_glyph_cache_free (CoglPangoGlyphCache *cache) { if (cache->using_global_atlas) _cogl_atlas_texture_remove_reorganize_callback (cogl_pango_glyph_cache_reorganize_cb, cache); cogl_pango_glyph_cache_clear (cache); g_hash_table_unref (cache->hash_table); g_hook_list_clear (&cache->reorganize_callbacks); g_free (cache); }
void kiro_sb_stop (KiroSb *self) { g_return_if_fail (self != NULL); KiroSbPrivate *priv = KIRO_SB_GET_PRIVATE (self); g_return_if_fail (priv->initialized != 0); if (priv->initialized == 1) { if (priv->server) kiro_server_free (priv->server); } if (priv->initialized == 2) { priv->close_signal = TRUE; while (g_main_loop_is_running (priv->main_loop)) {} g_thread_join (priv->main_thread); g_thread_unref (priv->main_thread); priv->main_thread = NULL; if (priv->client) kiro_client_free (priv->client); } g_hook_list_clear (&(priv->callbacks)); if (priv->trb) { kiro_trb_purge (priv->trb, FALSE); kiro_trb_free (priv->trb); } priv->trb = NULL; priv->server = NULL; priv->client = NULL; priv->initialized = 0; }
static void _cogl_context_free (CoglContext *context) { const CoglWinsysVtable *winsys = _cogl_context_get_winsys (context); winsys->context_deinit (context); _cogl_free_framebuffer_stack (context->framebuffer_stack); if (context->current_path) cogl_handle_unref (context->current_path); if (context->default_gl_texture_2d_tex) cogl_object_unref (context->default_gl_texture_2d_tex); if (context->default_gl_texture_3d_tex) cogl_object_unref (context->default_gl_texture_3d_tex); if (context->default_gl_texture_rect_tex) cogl_object_unref (context->default_gl_texture_rect_tex); if (context->opaque_color_pipeline) cogl_object_unref (context->opaque_color_pipeline); if (context->blended_color_pipeline) cogl_object_unref (context->blended_color_pipeline); if (context->texture_pipeline) cogl_object_unref (context->texture_pipeline); if (context->blit_texture_pipeline) cogl_object_unref (context->blit_texture_pipeline); if (context->swap_callback_closures) g_hash_table_destroy (context->swap_callback_closures); g_warn_if_fail (context->gles2_context_stack.length == 0); if (context->journal_flush_attributes_array) g_array_free (context->journal_flush_attributes_array, TRUE); if (context->journal_clip_bounds) g_array_free (context->journal_clip_bounds, TRUE); if (context->polygon_vertices) g_array_free (context->polygon_vertices, TRUE); if (context->quad_buffer_indices_byte) cogl_object_unref (context->quad_buffer_indices_byte); if (context->quad_buffer_indices) cogl_object_unref (context->quad_buffer_indices); if (context->rectangle_byte_indices) cogl_object_unref (context->rectangle_byte_indices); if (context->rectangle_short_indices) cogl_object_unref (context->rectangle_short_indices); if (context->default_pipeline) cogl_object_unref (context->default_pipeline); if (context->dummy_layer_dependant) cogl_object_unref (context->dummy_layer_dependant); if (context->default_layer_n) cogl_object_unref (context->default_layer_n); if (context->default_layer_0) cogl_object_unref (context->default_layer_0); if (context->current_clip_stack_valid) _cogl_clip_stack_unref (context->current_clip_stack); g_slist_free (context->atlases); g_hook_list_clear (&context->atlas_reorganize_callbacks); _cogl_bitmask_destroy (&context->enabled_builtin_attributes); _cogl_bitmask_destroy (&context->enable_builtin_attributes_tmp); _cogl_bitmask_destroy (&context->enabled_texcoord_attributes); _cogl_bitmask_destroy (&context->enable_texcoord_attributes_tmp); _cogl_bitmask_destroy (&context->enabled_custom_attributes); _cogl_bitmask_destroy (&context->enable_custom_attributes_tmp); _cogl_bitmask_destroy (&context->changed_bits_tmp); if (context->current_modelview_entry) cogl_matrix_entry_unref (context->current_modelview_entry); if (context->current_projection_entry) cogl_matrix_entry_unref (context->current_projection_entry); _cogl_matrix_entry_cache_destroy (&context->builtin_flushed_projection); _cogl_matrix_entry_cache_destroy (&context->builtin_flushed_modelview); _cogl_pipeline_cache_free (context->pipeline_cache); _cogl_sampler_cache_free (context->sampler_cache); _cogl_destroy_texture_units (); g_ptr_array_free (context->uniform_names, TRUE); g_hash_table_destroy (context->uniform_name_hash); g_hash_table_destroy (context->attribute_name_states_hash); g_array_free (context->attribute_name_index_map, TRUE); g_byte_array_free (context->buffer_map_fallback_array, TRUE); cogl_object_unref (context->display); g_free (context); }