Class中的ObjectIdentifier 发表于 2017-02-10 | ObjectIdentifier:用来判断类的标识,只要类实例、元类中才能使用。 1234567891011121314151617class Student {}let stuA = Student()let stuB = stuA// trueprint(ObjectIdentifier(stuA) == ObjectIdentifier(stuB))// trueprint(stuA === stuB)let stuC = Student()// falseprint(ObjectIdentifier(stuA) == ObjectIdentifier(stuC))// falseprint(stuA === stuC)