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
40
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
CSC509 Lecture 07
javiergs
PRO
0
250
Software Architecture
hschwentner
6
2.4k
Amazon Verified Permissions実践入門 〜Cedar活用とAppSync導入事例/Practical Introduction to Amazon Verified Permissions
fossamagna
2
100
EMこそClaude Codeでコード調査しよう
shibayu36
0
490
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
110
マンガアプリViewerの大画面対応を考える
kk__777
0
420
Ktorで簡単AIアプリケーション
tsukakei
0
120
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.2k
オンデバイスAIとXcode
ryodeveloper
0
290
CSC305 Lecture 11
javiergs
PRO
0
310
Introducing RemoteCompose: break your UI out of the app sandbox.
camaelon
2
140
マイベストのシンプルなデータ基盤の話 - Googleスイートとのつき合い方 / mybest-simple-data-architecture-google-nized
snhryt
0
110
Featured
See All Featured
A Tale of Four Properties
chriscoyier
161
23k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
How GitHub (no longer) Works
holman
315
140k
Designing for Performance
lara
610
69k
The Invisible Side of Design
smashingmag
302
51k
BBQ
matthewcrist
89
9.9k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
What's in a price? How to price your products and services
michaelherold
246
12k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
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!