[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementation of CFBridgingRelease() on GNUstep

From: Stefan Bidigaray
Subject: Re: Implementation of CFBridgingRelease() on GNUstep
Date: Wed, 31 May 2017 23:47:49 -0400

Hmm, good point. What exactly does CFBridgingRelease do? I thought it would just undo a previous CFBridgingRetain, but what you're saying is that it could be used on any CF object, not just objc objects that had been "converted" to CF.

I'll have a look at the documentation in more detail tomorrow and get back to you.

On May 31, 2017 23:07, "Daniel Ferreira (theiostream)" <address@hidden> wrote:
Hm, I get how this works for y = CFBridgingRetain(x) being equivalent
to CFRetain(): add +1 to x's reference count, let the ARC runtime get
rid of all the references to x, we've still got a 1 that can be later

However, this is still not quite clear to me when it comes to
CFBridgingRelease() being equivalent to CFRelease(). If I do something
like `s = CFRelease(CFStringCreate(...))`, s would reach reference
count 0 and be deallocated, thus rendering it unusable as an
Objective-C object. Or am I wrong here?

-- Daniel.

Gnustep-dev mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]