iphone - Don't worry about `retainCount`? Really? -


I'm told not to worry about maintaining their numbers. I understand that I should not decide to use conditional arguments based on the code to keep release or to keep code , but Should not I worry about it? I thought that they are in any way compatible with memory usage. For example, if I have a bunch of subsets of UIView which I also have to be able to repeat through NSArray , do it double < / Strong>, so the count of maintaining and hence the use of the application memory? If so, it is expensive or trivial, if there are subviews, say, 500 UIControl example? It is assuming that I need 500 instances, of course.

You do not have to worry about maintaining ' because it is often a misleading implementation description of the counting system

I post it shortly after Apple's documentation:

Important: < / Strong> This method usually has no value in debugging memory management issues because any number of structural objects have An object can be retained to capture context, while at the same time there can be any number of postponed releases on the object in the autoorridge pool, it is not very likely that you can get useful information from the method.

For your last question, adding memory to other arrays from one storage orange is not doubling your memory usage. Maintaining count is only an unsigned integer in that object, which increases to 1 when something claims its ownership. But again, do not worry about yourself with that.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -