• 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: Andy Lee <email@hidden>
  • Date: Wed, 4 May 2005 20:49:02 -0400

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.

If I let my application leak NSConnection objects, it works fine.  ;)

If no one can come up with an answer to this, I might end up creating an NSConnection pool/factory and do some "lazy" garbage collection.

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:


(a) can't send the message you want to send (like -release) right this moment, because

(b) you're in the middle of something (like using the object you would be releasing), but

(c) you want to send the message just as soon as you're done with that something.

Your idea of a NSConnection pool would essentially be a hand-rolled version of delayed performs.

--Andy

_______________________________________________
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: [NSConnection release] anxiety
      • From: Frank Midgley <email@hidden>
    • Re: [NSConnection release] anxiety
      • From: James Bucanek <email@hidden>
References: 
 >Re: [NSConnection release] anxiety (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: NSArrayController and the single NSMutableArray
  • Next by Date: Re: _NSGetCarbonMenu useage
  • Previous by thread: Re: [NSConnection release] anxiety
  • Next by thread: Re: [NSConnection release] anxiety
  • Index(es):
    • Date
    • Thread