Garbage collecting live threads
Garbage collecting live threads
- Subject: Garbage collecting live threads
- From: Edward Chan <email@hidden>
- Date: Mon, 14 Sep 2009 14:54:49 -0400
Hi,
How does the garbage collector react to live threads in which there are no
references to it?
For example,
myclass {
NSThread *mythread;
}
mythread = [[NSThread alloc] initWith....];
[mythread start];
...
//mythread is still running its main method
mythread = nil;
Would mythread be considered garbage and be collected even though it hasn't
finished running? If so, would it be cancelled first? Or would it just get
killed?
Ed
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden