• 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
AutoreleasePools and Threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AutoreleasePools and Threads


  • Subject: AutoreleasePools and Threads
  • From: Kevin Perry <email@hidden>
  • Date: Wed, 3 Jul 2002 21:04:54 -0700

Hi, in an application that I'm working on, there's a method detached in another thread. Of course, in that method, an autorelease pool is created as per necessity. However, in that method, there's a while() loop that repeats indefinitely that creates a lot of autoreleased objects that will never get released because the pool is released after the while() loop. I've got a half-decent solution to create another autorelease pool at the begin of the while loop and to release it at the end of the loop. However, I don't believe this frequent allocing and releasing of objects is as efficient as it could be. Is there a better solution for this that I have failed to notice?

Thanks!

-Kevin Perry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: AutoreleasePools
      • From: Ondra Cada <email@hidden>
    • Re: AutoreleasePools and Threads
      • From: Nathan Day <email@hidden>
    • Re: AutoreleasePools and Threads
      • From: David Rehring <email@hidden>
  • Prev by Date: File Type for binary files
  • Next by Date: NSTask launch from NSThread cause SIGABRT?!?
  • Previous by thread: Re: File Type for binary files
  • Next by thread: Re: AutoreleasePools and Threads
  • Index(es):
    • Date
    • Thread