Skip to content

Instantly share code, notes, and snippets.

@TachibanaKaoru
Created December 11, 2018 21:35
Show Gist options
  • Save TachibanaKaoru/dc512ce163dc361bbaaaf93a7e490969 to your computer and use it in GitHub Desktop.
Save TachibanaKaoru/dc512ce163dc361bbaaaf93a7e490969 to your computer and use it in GitHub Desktop.
ircular Reference async
let person1 = Person(name: "🐱")
let person2 = Person(name: "🦁")
let person3 = Person(name: "🐷")
let person4 = Person(name: "🐼")
let person5 = Person(name: "🐻")
person1.normalHello()
person2.strongHello()
person3.weakHello()
person4.noescapeHello()
person5.noescapeAndWeakHello()
// 硐果
--- init 🐱 ---
--- init 🦁 ---
--- init 🐷 ---
--- init 🐼 ---
--- init 🐻 ---
Hello, I am 🐱!
Hello, I am 🦁!
Hello, I am 🐷!
Hello, I am 🐼!
Hello, I am 🐻!
--- deinit 🐻 ---
--- deinit 🐷 ---
--- deinit 🐱 ---
....🦁 [strong]
....nil [weak]
....🐼 [noescape]
--- deinit 🐼 ---
....nil [noescape and weak]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment