I was wondering why the reta开发者_StackOverflow中文版inCount of a viewController is raised by 4 when pushed onto the stack of a Navigationcontroller e.g. from a tableView. What dependencies are created?
The retainCount
method of the NSObject
Protocol shouldn't be used for anything really. In fact, the documentation for this method says this:
This method is typically of no value in debugging memory management issues. Because any number of framework objects may have retained an object in order to hold references to it, while at the same time autorelease pools may be holding any number of deferred releases on an object, it is very unlikely that you can get useful information from this method.
If you are having memory management issues, make sure you've read the Memory Management Rules.
精彩评论