Re: Correct Order for CFRelease-ing CFNetwork Refs?
Re: Correct Order for CFRelease-ing CFNetwork Refs?
- Subject: Re: Correct Order for CFRelease-ing CFNetwork Refs?
- From: "Michael Ash" <email@hidden>
- Date: Tue, 1 Jul 2008 17:49:33 -0400
On Tue, Jul 1, 2008 at 1:09 PM, Kyle Sluder
<email@hidden> wrote:
> There won't be any documentation regarding allocating and deallocating
> most objects, because, like Cocoa, Core Foundation religiously follows
> a memory management scheme known as the Create Rule.
...
> How did you create your auth ref?
> CFHTTPAuthenticationCreateFromResponse? It seems that you have
> forgotten to CFRetain it (when you store it somewhere is the most
> likely place) and freeing the request is releasing the auth ref which
> is also being freed.
Since that function contains "Create", you already own it. CFRetaining
it will just require you to CFRelease it twice, which is pointless.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden