I\'ve been chasing a memory leak (reported by \'valgrind --leak-check=yes\') and it appears to be coming from ALSA. This code has been in the free world for some time so I\'
The biggest reported leak is that the global configuration is cached for next usage.
If you do not want this feature, simply call snd_config_update_free_global() after all snd_*_open*() calls.
This function will free the cache." <---- Valgrind still detects leaks.
This can be fixed if you call snd_config_update_free_global() after snd_pcm_close(handle);