Hi!
As far as i understand memory management all alloc/copy/new set retain counter to 1 and are not auto-released by default and you should be careful to release them when not needed anymore, but if you create an object via any other method like [Sprite spriteWithFile:...], we assume this objects are autoreleased. (Please let me know if i got it wrong)
So, my question is very general: how does cocos2d manages AutoRelease Pools or who is responsible to creating/draining them. If you have only one (default in main) NSAutoRelase pool does this mean, that all those sprites you create during game play go to that pool and are not released/deallocated until your app exits? How could we than create autorelease pools if our game is mainly created in one Scene (without destroying bunch of other, still used objects?). Does this mean that although this objects are autoreleased we should still release them manually when not needed anymore?
btw. I HATE all those books on Amazon about iphone/objective-C development, they are all the same - for beginners. But it is really hard to find some advanced topics, that matter when working on real project...like memory management on real project.
Yesterday i was really frustrated trying to find why two classes you define can not be referenced in each other (A using B and B using A). And the solution was NOT find in any of books but with google on some general programming site... (using @class directive instead of #include/#import)
I would be really happy if you know any good, advanced sources for working a real project...
thank you!