- Hands-On Design Patterns with Swift
- Florent Vilmart Giordano Scalzo Sergio De Simone
- 135字
- 2021-07-02 14:45:02
Understanding ARC and Memory Management
Swift has a very particular and almost unique memory management strategy: Automatic Reference Counting (ARC). When using ARC, the compiler will inject memory management code for us, but it's very easy to write poor, leaky code, either on purpose or by accident. In this chapter, we'll cover all of the basics for good memory management in Swift. From its origins in Objective-C, to the pre-ARC era, to today, we'll look at how to properly manage our memory and object life cycles. We'll also explore the powerful tools available with Xcode to track memory usage, leaks, cycles, and other defects, through the inspector and the leaks instrument.
In this chapter, we'll cover the following topics:
- A brief history of reference counting
- What is ARC?
- Debugging memory
- Leaks, cycles, and dangling references
推薦閱讀
- 數(shù)據(jù)浪潮
- 數(shù)據(jù)存儲架構(gòu)與技術(shù)
- Google Visualization API Essentials
- SQL Server 2012數(shù)據(jù)庫技術(shù)與應(yīng)用(微課版)
- 信息系統(tǒng)與數(shù)據(jù)科學
- 大數(shù)據(jù):從概念到運營
- 達夢數(shù)據(jù)庫性能優(yōu)化
- 重復(fù)數(shù)據(jù)刪除技術(shù):面向大數(shù)據(jù)管理的縮減技術(shù)
- SQL Server 2012實施與管理實戰(zhàn)指南
- 數(shù)據(jù)分析師養(yǎng)成寶典
- 大數(shù)據(jù)技術(shù)原理與應(yīng)用:概念、存儲、處理、分析與應(yīng)用
- R Machine Learning Essentials
- Access 2010數(shù)據(jù)庫程序設(shè)計實踐教程
- 數(shù)據(jù)分析思維:產(chǎn)品經(jīng)理的成長筆記
- MySQL數(shù)據(jù)庫應(yīng)用與管理