Hi, I’m working with spine runtime and cocos2d-x 3.14.1
I have some SkeletonAnimation that run animation and at the CompleteListener I would like to remove it.
With Cocos2d-x 2.2.6 (and old spine runtime) I use this code with success
SkeletonAnim * anim = SkeletonAnimation::createWithJsonFile(skeletonDataFile, atlasFile, 1.0);
spTrackEntry * entry = anim->setAnimation(0, animName, false);
anim->setTrackCompleteListener(entry, [anim] (int trackIndex, int loopCount)
With Cocos2d-x 3.14.1 this code raise an exception in SkeletonAnimation::update(float deltaTime).
Dispose of the instance of SkeletonAnimation arrived when update are running yet, so, I think, this cause the error.
Is there some sample or best practice to delete SkeletonAnimation at the end of the animation?