On Sep 12, 2013, at 10:19:22, Aaron Montgomery <[email protected]> wrote:

> - (void)setObject:(NSObject *)object
> {
>       [_object release];
>       _object = [object retain];//3
> }

It might be that setObject: is not safe if object is the same as _object. The 
correct way to do this is:

[object retain];
[_object release];
_object = object;

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157




_______________________________________________

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