cocos2d/cocos2d-iphone — pull request #195 by mhaylock (2012-03-29 22:22:52+00:00)
Title: Make CCParticleSystem unschedule its update selector on dealloc

We ran into an issue where a CCParticleSystem was being created at the same memory address as a CCParticleSystem that was previously dealloc'd. We would then (with `COCOS2D_DEBUG=1`) get a "CCScheduler: You can't re-schedule an 'update' selector'. Unschedule it first" error.

Adding an unschedule to the CCParticleSystem dealloc fixes this and seems like the correct behavior - it doesn't make sense to leave a selector scheduled for an object that no longer exists?