Hello,
I’ve been using this awesome library for a while and had a doubt about how the release / new mechanism works. For example for this code:
class A : public CCNode
{
// Some members & methods
}
class B : public CCNode
{
// Some members & methods
void func();
}
void B::func()
{
…
A a = new A;
this~~>addChild;
…
}
What happens when I call
B~~>removeAllChildren(true) // with cleanup = true
?
The A object is added to the B object, but not created using the release / retain / autorelease mechanism.
Does this provoke a memory leak?
Should I call delete getChildByTag; in the B destructor?
Thank you for your help!