mokagio/MGSpriteView — pull request #2 by jasonchin (2013-12-11 17:35:02+00:00)
Title: Fix memory leaks

I didn't realise this but often there were retain locks because of the callbacks, resulting in constant memory leaks.

So the changes to the callbacks below are because of this, so that the class doesn't take add to the retain count in a callback. This makes it correctly dealloc when it's owner is destroyed.

The other changes is to invalidate and remove objects which we have ownership of but might also exist outside of it's scope. Now that it's correctly dealloc'd it would have caused runtime crashes because of this.