• 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: self = [super init];
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: self = [super init];


  • Subject: Re: self = [super init];
  • From: Nathan Day <email@hidden>
  • Date: Thu, 04 Dec 2008 16:39:34 +1100

Usually self does not change, when the instance returned is different to the initially self then it is because the super init has decided that the initial self is not what it whats so it releases the initially self and returns a different object.

This can happen for singltons or cluster object or perhaps in a suation where the object represents some resource and if there is already an object for that resource the new instance is released and a retained version of the original instance is returned in its place.

On 04/12/2008, at 06:14 , EVS wrote:

self = [super init];

Why does the above line of code not cause a memory leak or memory fault?

_______________________________________________

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


  • Follow-Ups:
    • Re: self = [super init];
      • From: EVS <email@hidden>
References: 
 >self = [super init]; (From: EVS <email@hidden>)

  • Prev by Date: Re: Linking CFBundle with static libraries
  • Next by Date: Re: custom view binding to NSTreeController
  • Previous by thread: Re: self = [super init];
  • Next by thread: Re: self = [super init];
  • Index(es):
    • Date
    • Thread