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

Re: self release


  • Subject: Re: self release
  • From: Wolfgang Ante <email@hidden>
  • Date: Mon, 12 May 2003 20:46:49 +0200

Yes, that is definitely a bad idea, since it violates basic memory management principles. What you retain / alloc you must release!

Yes, good point!

So I think the best approach is your...

[[MyWorkingBee workingBeeWithWorkDesc:info] runInBackground];

...which is of course autoreleased and then in 'runInBackground' I [self retain] and when finished I just [self release].

This way I do not break "what you retain/alloc you must release" and I still get my suicidal object. ;-)

Thank you John and David for your help!

Bye, Wolfgang :-)
_______________________________________________
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.

  • Follow-Ups:
    • Re: self release
      • From: Danny Swarzman <email@hidden>
    • Re: self release
      • From: sinclair44 <email@hidden>
References: 
 >Re: self release (From: David Remahl <email@hidden>)

  • Prev by Date: NSView, NSImage, and flipped text?
  • Next by Date: NSOpenPanel ignoring its directory.
  • Previous by thread: Re: self release
  • Next by thread: Re: self release
  • Index(es):
    • Date
    • Thread