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
41
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
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
110
Go コードベースの構成と AI コンテキスト定義
andpad
0
150
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
430
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2k
Python札幌 LT資料
t3tra
7
1.1k
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osc25hi-duckdb
takahashiikki
0
230
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.5k
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
140
ThorVG Viewer In VS Code
nors
0
530
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
130
愛される翻訳の秘訣
kishikawakatsumi
3
370
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
450
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
77
The Curse of the Amulet
leimatthew05
0
6.6k
Navigating Weather and Climate Data
rabernat
0
61
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
250
Everyday Curiosity
cassininazir
0
120
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Between Models and Reality
mayunak
1
150
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Faster Mobile Websites
deanohume
310
31k
We Are The Robots
honzajavorek
0
130
Test your architecture with Archunit
thirion
1
2.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.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!