• 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: [NSConnection release] anxiety
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSConnection release] anxiety


  • Subject: Re: [NSConnection release] anxiety
  • From: James Bucanek <email@hidden>
  • Date: Thu, 5 May 2005 22:13:15 -0700

Frank Midgley wrote on Thursday, May 5, 2005:

>On May 4, 2005, at 7:49PM, Andy Lee wrote:
>
>> On May 4, 2005, at 8:25 PM, James Bucanek wrote:
>>
>>> My main problem is the lifetime of the NSConnection object
>>> itself.  Everything else pretty much takes care of itself, but I
>>> can't determine a definative time when the NSConnection object can
>>> be released.
<clip>
>>
>> This sounds like a candidate for one of the -performSelector...
>> methods in NSObject, with a delay of 0.  Delayed performs are good
>> for cases when you:
>>
<clip>
>
>We initially did this for invalidating connections and started
>getting dozens of unreproducible crash reports from end users.

Did what?  Were you using a delayed -performSelector selector as Andy suggested, or were you trying to release the NSConnection within the context of DO message?

>You'll see things like NSPortDeathNotify in the stack traces if you
>start to run into this problem.  After a large effort we were never
>able to come up with a reliable way to close a connection from within
>a DO call over that connection.  We ended up having to slightly re-
>architect our threading code so that connections were managed better
>and did not need to be closed during the DO calls.  All crashes went
>away at that point.

Could you define "better?"

Were you successful in releasing the NSConnection once all of the local DO message calls had returned?  Did you release the NSConnection immediately after last DO message, or did you have to wait?  If so, how long?

Enquiring minds want to know.

--
James Bucanek <mailto: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

References: 
 >Re: [NSConnection release] anxiety (From: Frank Midgley <email@hidden>)

  • Prev by Date: Weak link framework problem
  • Next by Date: NSTextView getting the cursor col/row
  • Previous by thread: Re: [NSConnection release] anxiety
  • Next by thread: NSTextView - text wrapping
  • Index(es):
    • Date
    • Thread