- Code: Select all
1
2
3
4
5MEMORYSTATUS 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
1
2
3
4sndRoadLoop[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.
