Re: Passing arguments to threads?
Re: Passing arguments to threads?
- Subject: Re: Passing arguments to threads?
- From: Nicko van Someren <email@hidden>
- Date: Thu, 18 Nov 2004 16:44:14 +0000
On 18 Nov 2004, at 16:35, Damien Bobillot wrote:
...
Yes with the NSThread class method :
+ (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget
withObject:(id)anArgument
there's only one argument, but you may given an NSArray, NSDictionary,
C structure, any Objective-C object…
^^^^^^^^^^
Passing a C structure is not a good idea with the this call since the
method will try to send a retain message to the argument before the
detach call returns and a release message when the thread completes.
Nicko
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden