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
Netty Chicago Java User Group 2024-04-17
sullis
0
170
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
810
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
190
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
5
870
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
670
効率化に挑戦してみたらモバイル開発が少し快適になった話
ryunakayama
0
120
Goのmultiple errorsについて (2024年4月版)
syumai
1
330
코틀린으로 멀티플랫폼 만들기
pangmoo
0
140
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
6
880
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
160
Java 22 Overview
kishida
1
180
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
260
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
301
110k
Testing 201, or: Great Expectations
jmmastey
27
6.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Being A Developer After 40
akosma
56
580k
Design by the Numbers
sachag
274
18k
Code Review Best Practice
trishagee
54
15k
Designing for humans not robots
tammielis
248
25k
Become a Pro
speakerdeck
PRO
10
4.5k
A Tale of Four Properties
chriscoyier
150
22k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
1
1.3k
[RailsConf 2023] Rails as a piece of cake
palkan
22
3.9k
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!