简体   繁体   中英

Potential memory leak - Received Memory Warning

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.

这是我分析代码时的代码图像

静态分析器并不总是写有关内存泄漏但是它假设当你调用finalOutput它会返回一个已分配的对象意味着+1保留计数对象,它永远不会被使用,它将这个waring视为内存泄漏!

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........

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM