Question

The documentation for PortAudio (a C audio library) states:

Pa_Terminate() MUST be called before exiting a program which uses PortAudio. Failure to do so may result in serious resource leaks, such as audio devices not being available until the next reboot.

(emphasis mine)

However, I've always understood that no modern operating system permits you to leak resources beyond the program's exit, so while it's "good practice" to clean up your allocated memory after use, it certainly won't harm anything if you don't (related questions: 1 2 etc).

But I'm also aware that older graphics card drivers would fail to free graphics memory in some situations, so leaks in that situation could cause system crashes.

My question is - does this actually happen with modern audio software and hardware?

  • If so, what exactly is the cause and mode of failure, in software or hardware?
  • If not, what's the foundation for the quote from the PortAudio documentation?
  • Which operating systems are vulnerable and which are not?
  • What can be done to prevent applications causing such problems?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top