Re: Releasing CFHost
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