Swift Retain/Release and Pointer Arithmetic
Russ Bishop (via Wolf Rentzsch): While creating ThreadLocalSlot<T>, I needed to call the posix posix_getspecific and posix_setspecific methods. Not only that, I needed to store an Objective-C object in a plain old void*. How can we accomplish that in Swift? The key is Unmanaged. It contains magic sauce to let us turn an AnyObject into … Continue reading Swift Retain/Release and Pointer Arithmetic
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed