Re: alloc, init and autorelease/release
Re: alloc, init and autorelease/release
- Subject: Re: alloc, init and autorelease/release
- From: Clark Cox <email@hidden>
- Date: Tue, 25 Oct 2005 07:32:29 -0400
On 10/24/05, Felix Schwarz <email@hidden> wrote:
> Thanks for the answers!
>
> FYI, what I'm trying to do here is to return a nil pointer in case
> something in the init-method failed (i.e. allocation of additional
> buffer memory failed or not all paramters were supplied).
>
> Regarding [self autorelease], I just want to be sure there isn't even
> the slightiest chance that any storage that might still be required,
> is free()d up while a routine of the object whose storage is being
> free()d does still execute anything.
You needn't worry about that. While inside your init method, nobody
else has a pointer to your object to even *try* to do anything.
Additionally, even if someone else did have a pointer to it, it would
have been their responsibility to retain it.
--
Clark S. Cox III
email@hidden
http://clarkcox3.livejournal.com/
http://homepage.mac.com/clarkcox3/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden