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.