• 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: Objects between threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objects between threads


  • Subject: Re: Objects between threads
  • From: Ondra Cada <email@hidden>
  • Date: Sat, 7 Sep 2002 18:06:38 +0200

On Saturday, September 7, 2002, at 05:37 , Chris Ross wrote:

If I create an object and add it to an array from an outside thread,
then the program segfaults when I try and access the object, and
it's methods. If I create the object within the thread and add it to
the same array, everything works fine. The array is created out
side the threads execution pool.

Looks like the _object_ though is over-released by the thread's autorelease pool (so that in the array remains just an invalid pointer).

Can't say for sure with this description, but it looks like something similar. IMHO the simplest way to check is to re-implement -dealloc of the object to see when (and, if you break there in gdb, also by whom) it is freed.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.
References: 
 >Re: Objects between threads (From: Chris Ross <email@hidden>)

  • Prev by Date: Re: Objects between threads
  • Next by Date: Re: how to centralize functionality more elegantly?
  • Previous by thread: Re: Objects between threads
  • Next by thread: Re: Objects between threads
  • Index(es):
    • Date
    • Thread