We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
SimpleAudioEngine Leaks Memory
SimpleAudioEngine Leaks Memory
Bug #3022 [Closed]
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8235
Status: | Closed | |
---|---|---|
Start date: | 2013-10-21 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | android, ios | |
Target version: | - |
Hey,
While running Instruments from Xcode to check for any memory leaks in my code, I’ve realized that the SimpleAudioEngine leaks memory. What I have in my game is a background music that I just call once and it keeps on repeating forever.
The following is my code for playing a background music:
CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic(“themeMusic.mp3”, true);
I’ve commented out all the other code that has to do with playing sound effects and background music. I’ve attached a screenshot of the objects that leak.
Obviously when I comment out the mentioned code I get zero memory leaks.
—Karim
Screen Shot 2013-08-28 at 3.05.55 PM.png - Memory Leak Screenshot (236.3 kB) kfikani, 2013-10-21 21:02