• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Garbage collecting live threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Garbage collecting live threads
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: sprintf and 64-bit integers
  • Next by Date: Re: coding NSNumber in NSArray?
  • Previous by thread: Re: Audio Unit problem in Snow Leopard
  • Next by thread: Re: Garbage collecting live threads
  • Index(es):
    • Date
    • Thread