波肥想跟我們談談使用 Swift 時,介面設計的想法、觀念與小技巧。因為太長講不完,所以這集先討論 Value Type 與 Reference Type。 { 完整節目筆記 https://weakself.dev/episodes/1) }
值還是引用?
Local Reasoning
Understanding Swift Performance (WWDC 2016): Heap, Stack and Performance)
Swift 裡用來管理 heap memory 的資料結構是 doubly linked list
扯題:ABI 穩定
當你需要 retain count 以及 deinitialization 時
當你需要 shared 資料 (centrally held and shared, singleton)
扯題:struct 可以有 singleton 嗎?
Tagged Pointer 詳解)(只適用於 iOS 12 之前的版本。iOS 12 有新的 Tagged Pointer 機制)
扯題:SwiftUI 用的 @propertyWrapper
Twitter @weak_self)
提問箱)
-- Hosting provided by SoundOn)