• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Memory management on returning nil in init
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory management on returning nil in init


  • Subject: Re: Memory management on returning nil in init
  • From: Scott Anguish <email@hidden>
  • Date: Mon, 21 Jun 2010 14:44:29 -0400

The old style

> if (self = [super init])

will cause a warnings with certain settings now and in the future.


On Jun 21, 2010, at 2:24 PM, vincent habchi wrote:

> Hi,
>
> Le 21 juin 2010 à 20:07, Scott Anguish a écrit :
>
>> And that does need to be updated.
>>
>> Nonetheless, that _is_ the new suggested initialization model.
>>
>>> On Mon, 21 Jun 2010 12:59:14 -0400, Scott Anguish <email@hidden> said:
>>>>
>>>> the new suggested format for calling super is
>>>>
>>>> self = [super init];
>>>> if (self) {
>
> I fail to understand what is the difference (apart purely aesthetic) betwixt
>
> self = [super init];
> if (self)
>
> and
>
> if (self = [super init])
>
> well, I am even more verbose than what Apple suggest, since I always use:
>
> if (self != nil)
>
>
>

_______________________________________________

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

  • Follow-Ups:
    • Re: Memory management on returning nil in init
      • From: email@hidden
References: 
 >Re: Memory management on returning nil in init (From: Matt Neuburg <email@hidden>)
 >Re: Memory management on returning nil in init (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: CoreData and memory leaks
  • Next by Date: Re: Memory management on returning nil in init
  • Previous by thread: Re: Memory management on returning nil in init
  • Next by thread: Re: Memory management on returning nil in init
  • Index(es):
    • Date
    • Thread