Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Memory Management in Swift.pdf
Search
André Gimenez Faria
November 09, 2019
Programming
1
38
Memory Management in Swift.pdf
Talk about the basics of memory management in Swift and iOS. Presented at NSBrazil, 2019.
André Gimenez Faria
November 09, 2019
Tweet
Share
Other Decks in Programming
See All in Programming
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
190
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
110
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
Spring gRPC について / About Spring gRPC
mackey0225
0
220
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
2024年のWebフロントエンドのふりかえりと2025年
sakito
2
240
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
2
190
GoとPHPのインターフェイスの違い
shimabox
2
180
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
Unity Android XR入門
sakutama_11
0
160
Featured
See All Featured
A designer walks into a library…
pauljervisheath
205
24k
Site-Speed That Sticks
csswizardry
4
380
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
Adopting Sorbet at Scale
ufuk
74
9.2k
Embracing the Ebb and Flow
colly
84
4.6k
GraphQLとの向き合い方2022年版
quramy
44
13k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Building Applications with DynamoDB
mza
93
6.2k
RailsConf 2023
tenderlove
29
1k
Transcript
Memory Management in Swift André Gimenez Faria iOS Developer @
Neon
Por que?
None
None
Como funciona?
ARC
Automatic eference ounting R C
"Hi" 1 myString
"Hi" 2 myString myOtherString
"Hi" 2 myString myOtherString myWeakString weak
"Hi" 1 myString myOtherString myWeakString weak
"Hi" 0 myString myOtherString myWeakString weak
None
None
Isso pode dar ruim?
A B
Classes vs Structs Protocols Closures
Struct Class Value Type Reference Type
None
Erro
2
2
Erro
3
3
Erro
5
5
Livro Página é formado por pertence a um
Book Page
Book [Pages] Book’
None
Book [Pages] Book’
None
Book [Pages] Book
None
Book [Pages] Book
None
None
None
Classes vs Structs Protocols Closures
None
None
None
Struct Enum Class
None
Classes vs Structs Protocols Closures
None
None
None
None
None
None
E como consertar código já existente?
None
None
None
None
None
None
None
None
None
None
TLDR Referências fortes para reter uma variável Structs - value
type Classes - reference type Retain cycle: duas referências fortes apontando entre si Closures “capturam fortemente” o que utilizam
@Andgfaria Obrigado!