> On May 8, 2015, at 2:43 AM, Daniel Höpfl <[email protected]> wrote:
> 
> a)
> @property (assign, nonatomic, readonly) GridCycler *cycler;
> 
> init:
> _cycler = [[GridCycler alloc] initWithGrid: self];
> 
> dealloc:
> [_cycler release];

Why are we presenting an assign property as the first (and presumably, default) 
choice? This is incorrect, in my view, even if it technically works; the 
property is owned by the LifeGrid object, and its declaration should reflect 
that. Plus, if you remove the “readonly” from the declaration (as in the 
original example), and a caller changes the property, it will not only leak 
memory but then crash.

Charles

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to