Re: Style question
Re: Style question
- Subject: Re: Style question
- From: F van der Meeren <email@hidden>
- Date: Mon, 30 Aug 2010 17:32:11 +0200
Prefer the first
[[[Foo alloc] init] autorelease];
If there is a @throw between the creation and return, there is a chance (if not properly handled) that the autorelease won't be called.
On 30 Aug 2010, at 17:29, Vincent Habchi wrote:
> Hi everybody,
>
> just an enquiry regarding coding style. What is considered best:
>
> baz = [[[Foo alloc] init] autorelease];
> …
> return baz;
>
> or
>
> baz = [[Foo alloc] init];
> …
> return [baz autorelease];
>
> ?
>
> Thanks!
> Vincent_______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden