Skip to content
Snippets Groups Projects
Commit c938fcf0 authored by tanel's avatar tanel
Browse files

Frees memory under LM rescoring related objects when finalizing

parent 864b6b3a
No related branches found
No related tags found
No related merge requests found
...@@ -1100,6 +1100,18 @@ static void gst_kaldinnet2onlinedecoder_finalize(GObject * object) { ...@@ -1100,6 +1100,18 @@ static void gst_kaldinnet2onlinedecoder_finalize(GObject * object) {
if (filter->adaptation_state) { if (filter->adaptation_state) {
delete filter->adaptation_state; delete filter->adaptation_state;
} }
g_free(filter->lm_fst_name);
g_free(filter->big_lm_const_arpa_name);
if (filter->lm_fst) {
delete filter->lm_fst;
}
if (filter->big_lm_const_arpa) {
delete filter->big_lm_const_arpa;
}
if (filter->lm_compose_cache) {
delete filter->lm_compose_cache;
}
G_OBJECT_CLASS(parent_class)->finalize(object); G_OBJECT_CLASS(parent_class)->finalize(object);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment