static void free_preview_job(void *data) { PreviewJob *pj = (PreviewJob *)data; BLI_mutex_free(pj->mutex); BLI_freelistN(&pj->previews); MEM_freeN(pj); }
/** Free (or release) any data used by this cachefile (does not free the cachefile itself). */ void BKE_cachefile_free(CacheFile *cache_file) { BKE_animdata_free((ID *)cache_file, false); #ifdef WITH_ALEMBIC ABC_free_handle(cache_file->handle); #endif if (cache_file->handle_mutex) { BLI_mutex_free(cache_file->handle_mutex); } BLI_freelistN(&cache_file->object_paths); }
void EEVEE_lightbake_job_data_free(void *custom_data) { EEVEE_LightBake *lbake = (EEVEE_LightBake *)custom_data; /* TODO reuse depsgraph. */ /* if (lbake->own_resources) { */ DEG_graph_free(lbake->depsgraph); /* } */ MEM_SAFE_FREE(lbake->cube_prb); MEM_SAFE_FREE(lbake->grid_prb); BLI_mutex_free(lbake->mutex); MEM_freeN(lbake); }