-
Notifications
You must be signed in to change notification settings - Fork 343
Description
Hi there,
We have encountered a large number of possible memory leaks reported by valgrind memcheck using the ALSA backend in our application.
This can can replicated with the audioprobe and record examples. See the memcheck logs for those test apps:
audioprobe-mem.log
record-mem.log
In this note, alsa-project state that not calling snd_config_update_free_global() after all snd_*_open*() calls can lead to leaks. This call frees the global configuration tree and sets snd_config to null, as documented here.
Sure enough, when I edit RtAudio.cpp to ensure that this is done where appropriate, the memcheck logs for audioprobe and record are clean. See below:
audioprobe-mem-fix.log
record-mem-fix.log
Has this been addressed before? I can create a PR if required.
Many thanks