Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Memory Management in Swift.pdf
Search
André Gimenez Faria
November 09, 2019
Programming
60
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
Other Decks in Programming
See All in Programming
R8 の設定見直しでアプリサイズ削減
andpad
0
190
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
450
AIに “答え“を書かせるのを やめてみた
___akari11
0
110
phperだってパンチカードでコーディングしたい
o0h
PRO
0
230
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
120
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
110
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
7.9k
Agents on Rails - Rails at Scale 2026
irinanazarova
0
350
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
930
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
150
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5k
Featured
See All Featured
Abbi's Birthday
coloredviolet
4
10k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Become a Pro
speakerdeck
PRO
31
6.3k
KATA
mclloyd
PRO
35
16k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
500
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
400
Typedesign – Prime Four
hannesfritz
42
3.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
Faster Mobile Websites
deanohume
310
32k
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!