Re: [self release] question...
Re: [self release] question...
- Subject: Re: [self release] question...
- From: Glen Low <email@hidden>
- Date: Sat, 20 Mar 2004 19:05:57 +0800
Hi hugele:
On 20/03/2004, at 3:45 AM, email@hidden wrote:
i feel stupid to ask this, but something shock me with [self
release]... i know i can do this in the init method, when self is the
class, but can it be done safely from the instance itself ???
If you're worried about the "self" suddenly going away while the method
is still running, you could always do: [self autorelease] -- this is
what I do in my init method anyway. (The only thing I can think of that
might be problematic with [self release] is that obviously you should
not refer to self anymore after you called it, since you may have run
your dealloc method.)
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.