[swift-evolution] RFC: Proposed rewrite of Unmanaged<T>

Dave Abrahams dabrahams at apple.com
Fri Dec 18 16:51:03 CST 2015


> On Dec 18, 2015, at 1:18 PM, Brent Royal-Gordon <brent at architechies.com> wrote:
> 
>> Also, while unambiguous, it’s a very low-level description of what’s happening, that doesn’t much help the user reading the documentation of a CF function to answer the “which one do I use?” question unless s/he’s already experienced with how to map what it says in that docs onto the use of ADDREF/TAKEREF.
> 
> I wonder if, instead of talking about retained/unretained, we should talk about whether the call “created" or “retrieved" the object it’s returning. If it created it, the object is +1; if it retrieved it, the object is +0.

I think I’d need more detail in order to evaluate the idea.  Are you suggesting changing the way some CF functions are documented?  Some concrete examples would certainly help.
 
-Dave





More information about the swift-evolution mailing list