Reputation: 23301
I have some issues in an app that I'm developing, where sometimes if I terminate while an animation is going on, it won't end up calling the release method in the internals of the animation api.
If I do [obj release] at the end just to be safe, well it will eventually cause an internal error to be thrown if the code does work correctly and release the object.
So, my question is, is there a way to ignore these errors calling release and just continue to the next line?
Upvotes: 0
Views: 79
Reputation: 17906
There is no way to safely ignore the errors.
Understanding object retention and release semantics is one of the most important parts of writing bug-free Objective-C code. You'll save yourself a lot of these hassles if you enable automatic reference counting (ARC), but the fact is that you just can't be a serious Objective-C coder without understanding how this stuff works.
As far as the particular error, I suggest you provide some code snippets of your blocks and how you are canceling the animations, so that we can point out how to properly balance your release calls.
Upvotes: 3