Projects > cpp > Issues > Bug #3022

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

SimpleAudioEngine Leaks Memory

Bug #3022 [Closed]
kfikani 2013-10-21 21:02 . Updated about 2 years ago

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

walzer@cocos2d-x.org 2014-10-08 02:54

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

Atom PDF

Status:Closed
Start date:2013-10-21
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:android, ios
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.