Re: self = [super init];
Re: self = [super init];
- Subject: Re: self = [super init];
- From: EVS <email@hidden>
- Date: Thu, 4 Dec 2008 03:32:42 -0500
Thank you, I suppose the reason I find it confusing is because self
is a pointer to the current object. If self were to release self ( the
current object ), while it is being used, I would have guessed that
would cause problems.
On Dec 4, 2008, at 12:39 AM, Nathan Day wrote:
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