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 Frith-MacDonald 1999-07-14 17:16:56 +00:00
parent 15518a7468
commit fd379e9937

View file

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