• 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: Releasing CFHost
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Releasing CFHost


  • Subject: Re: Releasing CFHost
  • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Date: Tue, 12 Jul 2011 15:26:08 +0100

On 29 Jun 2011, at 22:21, Rick Mann wrote:

> I'm not sure if CFHostScheduleWithRunLoop() or CFHostStartInfoResolution() retain the CFHostRef or not (the docs don't say either way).

The run loop does retain the objects that vendor run loop sources, so the code as you've posted it will work.  However, this isn't something I'd rely on.  My general advice is that, if you start an async operation for an object, you should hold on to that object until the async operation completes.  This will stop the static analyser complaining, and it has the added advantage that you can cancel the async operation if need be.

S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: create vpn/pptp connection programmatically
  • Next by Date: Re: NSURLDownload and http proxy username/password
  • Previous by thread: Re: create vpn/pptp connection programmatically
  • Next by thread: Trouble getting SSD Project working & Questions
  • Index(es):
    • Date
    • Thread