I am trying to update cocos2d-x from 1.0.1 to 2.0.1 in our game, then I found a weird problem about particle, I don’t know if it is a bug or just new way to use it:
I have code below in the ccTouchBegan() of the scene:
CCParticleSystem* par = CCParticleSystemQuad::create("particle.plist"); par->setPosition(touchLocation); par->setAutoRemoveOnFinish(true); addChild(par);
It works properly in 1.0.1 and auto remove itself when finished, but in 2.0.1, I got crash! It’s weird because it works in iOS but crash in windows.
It crashs when the particle finishes in CCParticleSystem.\ If\ I\ set\ AutoRemoveOnFinish\ as\ false,\ then\ no\ crash.
Finally\ I\ add\
par->retain();\ then\ it’s\ OK\ on\ all\ the\ platform,\ Is\ it\ a\ bug?\ Or\ we\ need\ to\ use\ it\ that\ after\ all?
Now\ I\ hesitate\ that\ if\ we\ should\ update\ our\ code\ to\ cocos2d-x\ 2.0.1,\ I\ need\ to\ balance\ with\ the\ new\ features\ and\ hidden\ danger.
Any\ suggestion?\ Big\ help