Re: self = [super init];
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