If I have
gameLevels = [[NSUserDefaults standardUserDefaults] arrayForKey:@"levels"];
after I extract the game level info do I need a
[gameLevels release];A fast, easy to use, free, and community supported 2D game engine
If I have
gameLevels = [[NSUserDefaults standardUserDefaults] arrayForKey:@"levels"];
after I extract the game level info do I need a
[gameLevels release];Do you see any alloc init, copy (or copyXXX), or retain in your one line of code ?
No ? Then you don't need a release.
thank you
As a newbie myself I was wondering about the whole memory management thing. It it safe to say, that all Layers, sprites, labels, etc created during a scene (added to a scene) are "released" by the director when a replaceScene occurs?
As long as you didn't alloc init your object but used one of the convenience autoreleasing class methods like node, that you didn't retain the object (or stored it in a retain property), then yes, it will be released when the scene is released.
You must log in to post.