PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Call of Sound::Free() seems not releasing resources

In onNextFrame() I do cheking of free memory amount:
Code:

MEMORYSTATUS memst;
memset( &memst;, 0, sizeof(MEMORYSTATUS) );
memst.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus( &memst; );
pBackBuffer->drawFormattedText( 300, 10, Font::getSystemFontWithBorder(), Font::RIGHT_ALIGN, TEXT("Mem: %dKB"), memst.dwAvailPhys/1024 );


And I use following code to stop and free resources of old sound and load new to the same object:
Code:

sndRoadLoop[0].stop();
sndRoadLoop[0].free();
sndRoadLoop[0].create( &soundFile;);
sndRoadLoop[0].play();


But is seems that Sound::Free() not realease memory buffers, because free memory reduces every reload and finnaly program hangs up.
Hi Nomad,
Yes, it seems we have a memory leak there. We are working on it right now.

Thank you for your bug report!

Sergio.