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)" <bnm...@gmail.com>
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
> CFRelease()d.
>
> 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
> Gnustep-dev@gnu.org
> https://lists.gnu.org/mailman/listinfo/gnustep-dev
>
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to