retaincount - Calling UIViews's subviews property increments subview retain count by 1? -


i have code:

uiview *superview = [[uiview alloc] init]; uiview *subview = [[uiview alloc] init]; [superview addsubview:subview]; [subview release]; nslog(@"retain before %i", [subview retaincount]);//prints 1 int = superview.subviews.count ; nslog(@"retain after %i", [subview retaincount]);//prints 2 = superview.subviews.count ; nslog(@"retain odd %i", [subview retaincount]);//keeps printing 2 

is "expected" behavior ?. if so, underlying logic ?


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -