Reputation: 1523
I am using iOS 7 and I am getting memory warnings in this part of code, but I'am not able to understand how the retain count increases as I release imageToSave variable too.
Upvotes: 0
Views: 157
Reputation: 451
You have not allocated memory to this object yourself, so you don't own it. And you are still releasing it.You can't release objects you don't own. Unless you use alloc method to allocate memory, you can't just release them........
Upvotes: 1
Reputation: 4005
Static analyser not always write about memory leak but its assuming that when you are calling finalOutput
its returning you an allocated object mean +1 retain count object which is never used and its treating this waring as memory leak!
Upvotes: 1