Skip to content

Instantly share code, notes, and snippets.

@Ben-G
Created May 30, 2015 15:48
Show Gist options
  • Save Ben-G/63f3f82340dcb38f292c to your computer and use it in GitHub Desktop.
Save Ben-G/63f3f82340dcb38f292c to your computer and use it in GitHub Desktop.
isUniquelyReferencedNonObjC, simple example
import Foundation
class A { var x = "a" }
var a:A = A()
isUniquelyReferencedNonObjC(&a)
var b = a
isUniquelyReferencedNonObjC(&a)
@iamraafay
Copy link

As per the doc this is only to check is it's NonObjC reference, right? So, then this should be checks with if.

Or maybe I'm just not getting it entirely right. Hence your explanation would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment