There's no way to tell just from those lines of code, we'd have to know how those objects are being set up. First, you should set NSZombieEnabled. You can find how in your developer documentation. You'll find lots of help using the debugger in the same document.
Then, run it again until the crash, and you should be able to find what line is causing the problem, and a hint to which object is being over-released. Someone can probably help from there.
There's no way to tell just from those lines of code, we'd have to know how those objects are being set up. First, you should set NSZombieEnabled. You can find how in your developer documentation. You'll find lots of help using the debugger in the same document.
Then, run it again until the crash, and you should be able to find what line is causing the problem, and a hint to which object is being over-released. Someone can probably help from there.
it crashes at
Code:
[tiltImage setImage:tiltTempImg];
the retain count for the tiltImage is 2 and tiltTempImg is 1
There's no reliable way to get retain count, so don't trust it. Since you are setting tiltTempImg, it's probably a problem with tiltImage. I bet it's being released and replaced with another object before you are getting to this code.
There's no reliable way to get retain count, so don't trust it. Since you are setting tiltTempImg, it's probably a problem with tiltImage. I bet it's being released and replaced with another object before you are getting to this code.
i havent done anything else with it. Thats why i am so puzzled haha