Re: self release
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.