简体   繁体   中英

Why does this count as a memory leak?

I was searching memory leaks in my app using Instruments and found this:
在此处输入图片说明
Why does it count as memory leak? Shouldn't this be released the next time autorelease pool is drained?

My take is that the release on the last line is the release corresponding to the autorelease. The fact that there is still a retain left supports this. If all retains are balanced the final line would be a release with a RefCt of 0.

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