Manual Memory Management in Swift (iOS)

a.b = b  // a retains b
b.a = a // b holds a weak reference to a -- not a reference cyclesetupDisplayLink() {
let pointerToSelf: UnsafeRawPointer = Unmanaged.passUnretained(self).toOpaque()…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store