I am having trouble understanding the last paragraph of Chapter 20 of Objective-C Programming,
“Following the idea of ownership, now it becomes clear why you need to autorelease the string in your description method: The employee object created the string, but it doesn’t want to own it. It wants to give it away”.
It would be nice if the lines of code were called out. Where exactly does the employee object create a string? Which string? Is it *label? My questions are:
- Where does the employee object create the string?
- Is this final paragraph refering to: @property (strong)NSString *label; ?
3 Isn’t the “strong” keyword unnecessary? Isn’t “strong” the default?