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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
André Gimenez Faria
November 09, 2019
Programming
41
1
Share
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
ハンズオンで学ぶクラウドネイティブ
tatsukiminami
0
110
Running Swift without an OS
kishikawakatsumi
0
740
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
110
CDK Deployのための ”反響定位”
watany
4
660
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
6.2k
感情を設計する
ichimichi
5
1.4k
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
880
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
220
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
130
Make GenAI Production-Ready with Kubernetes Patterns
bibryam
0
100
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
220
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
240
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
150
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
170
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
200
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
340
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
The Pragmatic Product Professional
lauravandoore
37
7.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Statistics for Hackers
jakevdp
799
230k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
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!