git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4588 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-07-14 17:16:56 +00:00
parent c15dcb2ef7
commit 4970d3c023

View file

@ -69,11 +69,13 @@
- (void) sendThreadMethod - (void) sendThreadMethod
{ {
/* /*
* We are running in the new thread - so an autorelease puts us in the * We are running in the new thread - so we store ourself in the thread
* pool for the thread. If the thread object calls [NSThread exit] the * dictionary and release ourself - thus, when the thread exits, we will
* pool will be released, otherwise, we call it ourself. * be deallocated cleanly.
*/ */
AUTORELEASE(self); [[[NSThread currentThread] threadDictionary] setObject: self
forKey: @"GSThreadLauncher"];
RELEASE(self);
[target performSelector: sel withObject: arg]; [target performSelector: sel withObject: arg];
[NSThread exit]; [NSThread exit];
} }