void ms_factory_destroy_event_queue(MSFactory *obj) { ms_event_queue_destroy(obj->evq); ms_factory_set_event_queue(obj,NULL); }
/** * Destroy the factory. * This should be done after destroying all objects created by the factory. **/ void ms_factory_destroy(MSFactory *factory){ ms_factory_uninit_plugins(factory); if (factory->evq) ms_event_queue_destroy(factory->evq); factory->formats=ms_list_free_with_data(factory->formats,(void(*)(void*))ms_fmt_descriptor_destroy); factory->desc_list=ms_list_free(factory->desc_list); ms_list_for_each(factory->stats_list,ms_free); factory->stats_list=ms_list_free(factory->stats_list); ms_list_for_each(factory->platform_tags, ms_free); factory->platform_tags = ms_list_free(factory->platform_tags); if (factory->plugins_dir) ms_free(factory->plugins_dir); ms_free(factory); if (factory==fallback_factory) fallback_factory=NULL; }