summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-17 12:07:49 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-25 22:13:17 +0100
commite45767b00443e7a5ea3a13e22b9620f6eedc872e (patch)
tree0456a45b448c33aa1c9e6dc7d7f20a51f1cd8b3f /src/lib/edje
parentd10882ef141579239a585ba9610dfa524e8685c9 (diff)
downloadefl-e45767b00443e7a5ea3a13e22b9620f6eedc872e.tar.gz
edje/multisense: track and destroy multisense inputs on shutdown
leaking these means leaking file references, and there's no reason for it Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11533
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_multisense.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/edje/edje_multisense.c b/src/lib/edje/edje_multisense.c
index b1575f464c..1bbb457ae3 100644
--- a/src/lib/edje/edje_multisense.c
+++ b/src/lib/edje/edje_multisense.c
@@ -5,11 +5,13 @@
static Eo *out = NULL;
static int outs = 0;
+static Eina_List *ins = NULL;
static Eina_Bool outfail = EINA_FALSE;
static void
_play_finished(void *data EINA_UNUSED, const Efl_Event *event)
{
+ ins = eina_list_remove(ins, event->object);
efl_unref(event->object);
}
@@ -245,6 +247,7 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
efl_unref(in);
return EINA_FALSE;
}
+ ins = eina_list_append(ins, in);
}
}
return EINA_TRUE;
@@ -348,6 +351,7 @@ void
_edje_multisense_shutdown(void)
{
#ifdef ENABLE_MULTISENSE
+ Eo *in;
if (outs > 0)
{
WRN("Shutting down audio while samples still playing");
@@ -358,6 +362,8 @@ _edje_multisense_shutdown(void)
out = NULL;
outs = 0;
}
+ EINA_LIST_FREE(ins, in)
+ efl_unref(in);
ecore_audio_shutdown();
#endif
}