I am using the this code in my iPhone application:
UIButton * MyButton=[UIButton ButtonWithType:UIButtonTypeRoundRect]retain];
If I don't use this retain
will my app cra开发者_如何转开发sh? What is the function of this retain
?
You should retain because the UIButton object returned from the call is autoreleased.
精彩评论