does addSubview increment retain count?

前端 未结 3 1003
情歌与酒
情歌与酒 2020-12-18 06:30

I\'ve tested it and it looks like it does. So my question is, does it ALWAYS increment the retain count.

So everytime I do something like this:

UIVie         


        
3条回答
  •  悲&欢浪女
    2020-12-18 06:59

    Actually it does. You can refer this at http://developer.apple.com/library/ios/documentation/uikit/reference/uiview_class/uiview/uiview.html#//apple_ref/occ/instm/UIView/addSubview:

    As a matter of course, the superView retains the subView on addSubview: , so it does release when removes the subView.

提交回复
热议问题