Top "Retain" questions

Objective-C copy and retain

When should I use copy instead of using retain? I didn't quite get it.

objective-c copy retain
Swift: how to log out retain count of objects?

Is there a way to quickly log out the retain count of objects to Xcode's Console? If not, what's the …

ios iphone swift reference retain
Assigning retained object to weak property

I am using Xcode 6 and I have created my app with a UITableView and a custom Cell in it. This …

ios objective-c retain
Objective-C: ARC forbids explicit message send of 'retain'

I'm new to Objective-C, I try to port an old Objective-C project written in an older version of Objective-C to …

objective-c automatic-ref-counting retain
What increases an object's retain count?

Here is code I am referring to. // Person.h @interface Person : NSObject { NSString *firstName; NSString *lastName; } @end // Person.m @implementation …

objective-c memory memory-management retain
IBOutlet instances are (null) after loading from NIB

I am working on an iPhone app and am getting (null) references to IBOutlet fields in my controller. I have …

ios objective-c null iboutlet retain
What happens if I don't retain IBOutlet?

If I do this: @interface RegisterController : UIViewController <UITextFieldDelegate> { IBOutlet UITextField *usernameField; } instead of this: @interface RegisterController : UIViewController <…

iphone retain
NSArray property: copy or retain?

According to this: NSString property: copy or retain? For NSString/NSMutableString, copy is recommended. How about NSArray/NSMutableArray?

objective-c properties copy nsarray retain
Non-retaining array for delegates

In a Cocoa Touch project, I need a specific class to have not only a single delegate object, but many …

iphone cocoa-touch delegates nsarray retain
PHP - Best practice to retain form values across postback

Complete PHP novice here, almost all my previous work was in ASP.NET. I am now working on a PHP …

php postback retain