Which is the best way to handle creating an object to live in a retained property? I\'ve included several examples.
Assume the property is:
@property
Option 1 is correct.
Option 2 is absolutely wrong. You never call -release on the results of a property accessor.
Option 3 is avoiding properties entirely. This is actually correct in your -init method, but in other methods it's better to use the property setter unless you have a good reason to avoid it.
Option 4 is correct as well, though it's more verbose than option 1. Your call.
Edit: I misread your option 4 originally.