In CCParticleBatchNode.cpp, there is one function call which I can’t understand:
`void CCParticleBatchNode::removeChild(CCNode* child, bool cleanup)
// particle could be reused for self rendering *pChild->setBatchNode(NULL);* ...
pChild~~>setBatchNode. What is this line used for? And what does self rendering mean?
The reason I concern it is because I got one bug recently. It crashes when calling glDrawElement when rendering labels and particle batch nodes simultaneously. I worked on it for a long time and am 99% sure that the bug hides inside the engine. After I comment this sentence Child~~>setBatchNode(NULL); everything goes well and no crash any more. I can see a lot of memory operations inside the function and are very suspicious if there are any potential bug or loophole in it.
Could any one answer my question please?
1 What is this function setBatchNode() used for? What does self rendering mean?
2 Could any engine developer check if all memory operations inside setBatchNode() is completely correct? I’m very doubt about that.
Thanks in advance.