Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSConnection release] anxiety



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.