title: When to use takeUnretainedValue() or takeRetainedValue() to retrieve Unmanaged Objects in Swift?
body: <p>According to <a href="https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/WorkingWithCocoaDataTypes.html#//apple_ref/doc/uid/TP40014216-CH6-XID_50" rel="noreferrer">Using Swift with Cocoa and Objective-C</a> you can use <code>takeUnretainedValue()</code> and <code>takeRetainedValue()</code>to tell Swift how to manage the memory of an object for a function like this: </p>
  
  <pre><code>func StringByAddingTwoStrings(CFString!, CFString!) -&gt; Unmanaged&lt;CFString&gt;!
  </code></pre>
  
  <p>When do I have to use <code>takeUnretainedValue()</code> or <code>takeRetainedValue()</code>?</p>
  
  <p>When I use ARC is it then always <code>takeUnretainedValue()</code>?</p>