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
Triangle Cocoa
September 27, 2012
Programming
170
5
Share
Instruments: Leaks by Trevor Brown
Trevor discusses using the leaks tool in Instruments from CocoaHeads September in Durham
Triangle Cocoa
September 27, 2012
More Decks by Triangle Cocoa
See All by Triangle Cocoa
App Store Secrets by Lawrence Ingraham
trianglecocoa
1
330
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
200
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
510
Foundation Collections by Kevin Conner
trianglecocoa
3
280
Multithreaded Drawing by Eric Lanz
trianglecocoa
3
240
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
200
Understanding UIResponder by Dirk Smith
trianglecocoa
5
380
Taming Xcode by Jay Thrash
trianglecocoa
3
170
Other Decks in Programming
See All in Programming
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1.6k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
310
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
140
分析エージェント精度向上における データアナリストの役割
oura_shoya
0
130
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
430
AIエージェントの隔離技術の徹底比較
kawayu
0
440
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
220
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
160
TSKaigi 2026 TypeScriptバックエンドのオブザーバビリティ戦略 — Datadog × NestJSの実践
taiseiyamamotoan
1
210
LLM Plugin for Node-REDの利用方法と開発について
404background
0
130
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
380
[BalkanRuby 2026] Drop your app/services!
palkan
3
710
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.5k
What's in a price? How to price your products and services
michaelherold
247
13k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
750
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
150
The SEO Collaboration Effect
kristinabergwall1
1
470
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
370
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
820
How to train your dragon (web standard)
notwaldorf
97
6.6k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
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!