• 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 release] question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Progress indicator in dock icon
  • Next by Date: Re: [Solved partially] NSTask with complexe command
  • Previous by thread: Re: [self release] question...
  • Next by thread: Re: [self release] question...
  • Index(es):
    • Date
    • Thread