Let's write a simple class to explain in my head :
class SomeClass {
var happyToUsed = 10
}
And create an object
let someObject = SomeClass()
and use its property for case 1:
someObject.happyToUsed // prints 10
for case 2:
someObject.self.happyToUsed // prints 10
and case 3
someObject.self.self.self.self.happyToUsed // prints 10 compiler is still ok, even if self count 1k
I know case 1 and case 2 is same ( directly point the same object ). Even if I have used SomeClass.self rather than objects cases will act the same way. I ever used case 3 in a project so far.
My question is there any example case 3 which I should prefer or negative effect on memory management?