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
Instruments: Leaks by Trevor Brown
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Triangle Cocoa
September 27, 2012
Programming
5
170
Instruments: Leaks by Trevor Brown
Trevor discusses using the leaks tool in Instruments from CocoaHeads September in Durham
Triangle Cocoa
September 27, 2012
Tweet
Share
More Decks by Triangle Cocoa
See All by Triangle Cocoa
App Store Secrets by Lawrence Ingraham
trianglecocoa
1
300
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
200
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
500
Foundation Collections by Kevin Conner
trianglecocoa
3
270
Multithreaded Drawing by Eric Lanz
trianglecocoa
3
230
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
190
Understanding UIResponder by Dirk Smith
trianglecocoa
5
350
Taming Xcode by Jay Thrash
trianglecocoa
3
160
Other Decks in Programming
See All in Programming
Basic Architectures
denyspoltorak
0
680
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
高速開発のためのコード整理術
sutetotanuki
1
400
AI巻き込み型コードレビューのススメ
nealle
2
370
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
140
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
130
今から始めるClaude Code超入門
448jp
8
8.9k
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
190
Featured
See All Featured
Accessibility Awareness
sabderemane
0
52
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Fireside Chat
paigeccino
41
3.8k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
260
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
210
Into the Great Unknown - MozCon
thekraken
40
2.3k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Prompt Engineering for Job Search
mfonobong
0
160
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Transcript
INSTRUMENTS: LEAKS Trevor Brown Triangle CocoaHeads September 2012
What are leaks? How can we detect them? How can
we prevent them? Q&A Resources
Memory that... has been consumed (allocated), is no longer needed,
but cannot be returned to the OS for reuse or accessed by the program that allocated it. Is there a problem with that? Waste of resources Slowdown (unresponsive) Unexpected shutdown by OS WHAT ARE LEAKS? (and why they’re bad)
HOW CAN WE DETECT LEAKS? Static Analyzer (Xcode) Instruments Code
review
Launch your app with the profiler
None
None
None
None
None
Random audience member: “Thanks for the total waste of time,
Trevor. I use ARC. Like, all the time. Wow... Um, beer, anyone?”
RETAIN CYCLE
Object A Object B RETAIN CYCLE
None
LEAK PREVENTION Use ARC (convert) Avoid retain cycles (no strong-strong
relationships) Handle low-memory warnings from the OS Run the static analyzer
QUESTIONS?
RESOURCES Performing static code analysis Instruments User Guide ARC transition
notes
THANK YOU!