- Hands-On Design Patterns with Swift
- Florent Vilmart Giordano Scalzo Sergio De Simone
- 70字
- 2021-07-02 14:45:07
Fixing the leak
Now that we've seen a simple leak, we have to change our implementation, in order to prevent the leaks from occurring. In our case, this can lead to other unexpected behavior. We have multiple options to resolve this particular self reference, as follows:
- Using weak
- Using unowned
- Ensuring that we never set ref = self
Let's investigate the solutions that involve weak and unowned.
推薦閱讀
- 使用GitOps實現(xiàn)Kubernetes的持續(xù)部署:模式、流程及工具
- 區(qū)塊鏈:看得見的信任
- Creating Dynamic UIs with Android Fragments(Second Edition)
- 數(shù)據(jù)驅(qū)動設(shè)計:A/B測試提升用戶體驗
- 數(shù)據(jù)庫設(shè)計與應(yīng)用(SQL Server 2014)(第二版)
- 計算機應(yīng)用基礎(chǔ)教程上機指導(dǎo)與習(xí)題集(微課版)
- 重復(fù)數(shù)據(jù)刪除技術(shù):面向大數(shù)據(jù)管理的縮減技術(shù)
- 探索新型智庫發(fā)展之路:藍(lán)迪國際智庫報告·2015(下冊)
- Google Cloud Platform for Developers
- Filecoin原理與實現(xiàn)
- 精通Neo4j
- R數(shù)據(jù)挖掘?qū)崙?zhàn)
- Learning Construct 2
- 零基礎(chǔ)學(xué)SQL
- Computer Programming for Absolute Beginners