Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

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


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

Postby Nomad » Nov 6, 2006 @ 11:58am

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





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 );
5 lines; 2 keywds; 3 nums; 37 ops; 1 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  


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




sndRoadLoop[0].stop();
sndRoadLoop[0].free();
sndRoadLoop[0].create( &soundFile);
sndRoadLoop[0].play();
4 lines; 0 keywds; 4 nums; 25 ops; 0 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  


But is seems that Sound::Free() not realease memory buffers, because free memory reduces every reload and finnaly program hangs up.
Nomad
pm Member
 
Posts: 76
Joined: Oct 28, 2006 @ 8:21pm
Location: Ukraine, Kiev


Postby Sergio » Nov 6, 2006 @ 12:08pm

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.
Sergio Fierens

GledPlay
User avatar
Sergio
pm Member
 
Posts: 97
Joined: Mar 17, 2006 @ 2:43pm


Return to GledPlay


Sort


Forum Description

Game Engine for Embedded Devices. Simple, complete, and powerful. Focused on the game.

Moderators:

Matias, Sergio

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron