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
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
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
1k
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
340
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
260
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
事業会社でのセキュリティ長期インターンについて
masachikaura
0
240
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
230
CDK Deployのための ”反響定位”
watany
4
660
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
0
110
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
830
KagglerがMixSeekを触ってみた
morim
0
370
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
290
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
320
Featured
See All Featured
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
330
The Curse of the Amulet
leimatthew05
1
11k
The agentic SEO stack - context over prompts
schlessera
0
740
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
400
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
140
Designing for Performance
lara
611
70k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Skip the Path - Find Your Career Trail
mkilby
1
100
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Designing Powerful Visuals for Engaging Learning
tmiket
1
330
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
490
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!