AutoreleasePools and Threads
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.