Hi.

I was playing around with PortMidi earlier and noticed a memory leak. The
memory leak can be reproduced with this simple example program:

#include <portmidi.h>
int main(void) {
  Pm_Initialize()
  Pm_Terminate()
  return 0;
}

Running this with AddressSanitizer (a memory error checker) reports that
some memory is still allocated when the program exists. The number of
objects that are still allocated is the same as the number of midi devices
found by portmidi. So it would seem that portmidi allocates something for
each device when Pm_Initialize() is called, but doesn't free it when
Pm_Terminate() is called. The platform I noticed the problem on was Linux
with the ALSA API.

I've decided against using PortMidi for my projects so I'm not going to
spend any more time investigating this problem, but I figured I should at
least let you know that it exists.
_______________________________________________
media_api mailing list
media_api@create.ucsb.edu
http://lists.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to