• 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 23:27:42 +0200

Regarding the point that a thread should release its resources when it dies...

According to the documentation for NSThread's -detachThreadSelector:toTarget:withObject:, the thread actually retains aTarget for the duration of the thread. Therefore, if runInBackground spins off a thread (as it most likely does), then the object will be automagically released when the thread completes. No retains, no ambiguities.

*That* is the ultimate answer to my (real) question! Sorry for confusing things by asking the wrong question in the beginning.

So I don't have to [self release] at all. I somehow knew Cocoa would be that nice, because I never saw [self release] anywhere before.

Thanks!

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: lbland <email@hidden>
References: 
 >Re: self release (From: David Remahl <email@hidden>)

  • Prev by Date: Re: self release
  • Next by Date: Re: Inconsistencies with NSString in GDB
  • Previous by thread: Re: self release
  • Next by thread: Re: self release
  • Index(es):
    • Date
    • Thread