Re: malloc/free problems within a thread
Re: malloc/free problems within a thread
- Subject: Re: malloc/free problems within a thread
- From: Ken Tozier <email@hidden>
- Date: Sat, 29 Jul 2006 18:14:55 -0400
On Jul 29, 2006, at 6:12 PM, Ken Tozier wrote:
On Jul 29, 2006, at 5:58 PM, Bill Bumgarner wrote:
It sounds like you are trashing memory somewhere or you have an
object in an autorelease pool in one thread that is being accessed
after the pool is released, likely in a different thread (since
your error messages are changing).
That's probably what's happening but I'm not sure how to fix it.
I'm scanning a large folder hierarchy on a server that takes quite
awhile to execute (avg 12 minutes) and I want the machine to be
usable while this is going on in the background. I'm adding and
removing objects to a mutable array allocated in the init method
from the thread.
That part is a bit unclear. What I do is allocate the mutable array
and then spawn the thread.
Is this what's doing it? If so, how would I keep some of the
objects found inside the context of the thread once it exits? Do
something like this?
[myMutableArray performSelectorOnMainThread: @Selector(addObject:)
withData: someData]
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40comcast.net
This email sent to email@hidden
_______________________________________________
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