title: proper instantiation & memory management in cocos2d-x
body: <p>I've been looking for documentation for cocos2d-x but it seems to be really really poor beyond the very basics. I understand that my own classes should inherit from <code>CCObject</code> to be able to use (originally cocoa's) <code>retain</code>/<code>release</code> mechanism, but I'm still confused about what happens when you <code>new</code> something. <code>init</code> is not called automatically. is it OK to call it from inside the constructor? does that alone guarantee that my object will start with a reference count of 1? what is <code>CC_SAFE_DELETE</code> and when should I use it? do <code>release</code> and <code>autorelease</code> work exactly like in cocoa? what about <code>CC_SYNTHESIZE</code>? I just need to see a <strong>properly coded</strong> class example (and it's instantiation/destruction) to understand what I'm supposed to do so as not to screw and leave memory leaks.
  thank you.</p>