Subclassing CCObject: is that a good idea ?

Subclassing CCObject: is that a good idea ?
0.0 0


Hi all,

For my first message, I will start to say that I intend to use cocos2d-x for my next project, and having already used cocos2d-ios, I am very confident and impatient to start.

Now to my question.

Since I am quite new with C++, I have looked at how cocos2d-x manages memory. I see that the CCObject class does most of the work, with a reference counting implementation. That feels a lot like Objective-C, which I guess is the objective.
I was wondering about how to manage memory for my project, for my own classes. Reference counting is one of my favorite lead, so what about subclassing CCObject in all my classes ? Do you think that is a good idea, or does CCObject does additional things that could have undesired side-effects to my non-graphical classes ?



I personally subclass CCNode.
Are you going to implement something advanced for memory management?


Yeah, inheriting CCNode is officially recommended.


what about some Level Class? i have a level information file, now i want to create a class to parse the file.