Swift.Unmanaged
http://www.mikeash.com/pyblog/friday-qa-2017-08-11-swiftunmanaged.html [www.mikeash.com]
2017-08-12 18:45
One of Swift’s great strengths is the smoothness with which it interoperates with C code. The Unmanaged API is a key component of that. Unfortunately, it requires the programmer to make memory management decisions as pointers move in and out of Swift, but that’s an inherent part of the job it does. Once you have the memory management figured out, it’s mostly straightforward to use.