Game Development Reference
In-Depth Information
C++ developers must keep in mind that Ref is managed by the framework. This means
that objects are being internally added to caches and the autorelease pool even
though you may not want this to happen. When you create that Player sprite, for in-
stance, the player.png file you used will be added to the texture cache, or the sprite
frame cache. When you add the sprite to a layer, the sprite will be added to a list of all
children of that layer, and this list will be managed by the framework. My advice is, relax
and let the framework work for you.
Non-C++ developers should keep in mind that any class not derived from Ref should be
managed the usual way, that is, if you are creating a new object you must delete it at some
point:
MyObject* object = new MyObject();
delete object;
Search WWH ::




Custom Search