ges: Cleanup internal hash table on deinit

System-wide once allocated but it makes tracing leak hard
This commit is contained in:
Seungha Yang 2019-01-12 20:23:50 +09:00 committed by Thibault Saunier
parent 15c891e76a
commit ef173bb7c4
3 changed files with 12 additions and 0 deletions

View file

@ -638,6 +638,13 @@ ges_asset_cache_init (void)
_init_standard_transition_assets (); _init_standard_transition_assets ();
} }
void
ges_asset_cache_deinit (void)
{
g_hash_table_destroy (type_entries_table);
type_entries_table = NULL;
}
gboolean gboolean
ges_asset_request_id_update (GESAsset * asset, gchar ** proposed_id, ges_asset_request_id_update (GESAsset * asset, gchar ** proposed_id,
GError * error) GError * error)

View file

@ -139,6 +139,9 @@ track_disable_last_gap (GESTrack *track, gboolean disabled);
G_GNUC_INTERNAL void G_GNUC_INTERNAL void
ges_asset_cache_init (void); ges_asset_cache_init (void);
G_GNUC_INTERNAL void
ges_asset_cache_deinit (void);
G_GNUC_INTERNAL void G_GNUC_INTERNAL void
ges_asset_set_id (GESAsset *asset, const gchar *id); ges_asset_set_id (GESAsset *asset, const gchar *id);

View file

@ -214,6 +214,8 @@ ges_deinit (void)
/* Register track elements */ /* Register track elements */
g_type_class_unref (g_type_class_peek (GES_TYPE_EFFECT)); g_type_class_unref (g_type_class_peek (GES_TYPE_EFFECT));
ges_asset_cache_deinit ();
ges_deinitialized = TRUE; ges_deinitialized = TRUE;
G_UNLOCK (init_lock); G_UNLOCK (init_lock);