<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 4, 2016, at 13:32, Kyle Jessup via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I have this code which uses Unmanaged and the API seems to vary depending on if I am using a 3.0 Preview or a development snapshot. I see it now when trying the June 13th/27th preview vs June 20th snapshot.<br class=""><br class="">class MyClass {}<br class=""><br class="">let holderObject = MyClass()<br class=""><br class="">#if FLIP // works with PREVIEW<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let leakyObject = UnsafeMutablePointer<Void>(OpaquePointer(bitPattern: Unmanaged.passRetained(holderObject)))<br class="">#else // works with SNAPSHOT<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let leakyObject = Unmanaged.passRetained(holderObject).toOpaque()<br class="">#endif<br class=""><br class="">#if FLIP // works with PREVIEW<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let unleakyObject = Unmanaged<MyClass>.fromOpaque(OpaquePointer(leakyObject)).takeRetainedValue()<br class="">#else // works with SNAPSHOT<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let unleakyObject = Unmanaged<MyClass>.fromOpaque(leakyObject).takeRetainedValue()<br class="">#endif<br class=""><br class="">I see the same difference between the previous snapshots and previews all the way back to the “false” preview of yore.<br class=""><br class="">Am I misunderstanding something about the API or is this a bug?</div></div></blockquote><br class=""></div><div>We just didn’t manage to get <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0017-convert-unmanaged-to-use-unsafepointer.md" class="">SE-0017</a> in before the first preview. The development branch (your SNAPSHOT) is the one that will match the final Swift 3.</div><div><br class=""></div><div>Jordan</div><br class=""></body></html>