void NineResource9_dtor( struct NineResource9 *This ) { if (This->pdata) { util_hash_table_foreach(This->pdata, ht_guid_delete, NULL); util_hash_table_destroy(This->pdata); } /* NOTE: We do have to use refcounting, the driver might * still hold a reference. */ pipe_resource_reference(&This->resource, NULL); /* release allocated system memory for non-D3DPOOL_DEFAULT resources */ if (This->data) FREE(This->data); NineUnknown_dtor(&This->base); }
static OMX_ERRORTYPE h264d_prc_deallocate_resources(void *ap_obj) { vid_dec_PrivateType*priv = ap_obj; assert(priv); /* Clear hash table */ util_hash_table_foreach(priv->video_buffer_map, &hash_table_clear_item_callback, NULL); util_hash_table_destroy(priv->video_buffer_map); if (priv->pipe) { vl_compositor_cleanup_state(&priv->cstate); vl_compositor_cleanup(&priv->compositor); priv->pipe->destroy(priv->pipe); } if (priv->screen) omx_put_screen(); return OMX_ErrorNone; }