• 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
Re: malloc/free problems within a thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:12:53 -0400


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. 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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: malloc/free problems within a thread
      • From: Ken Tozier <email@hidden>
References: 
 >malloc/free problems within a thread (From: Ken Tozier <email@hidden>)
 >Re: malloc/free problems within a thread (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: malloc/free problems within a thread
  • Next by Date: Re: NSSearchField - detect loss of focus
  • Previous by thread: Re: malloc/free problems within a thread
  • Next by thread: Re: malloc/free problems within a thread
  • Index(es):
    • Date
    • Thread