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
170
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
340
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
210
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
520
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
210
Understanding UIResponder by Dirk Smith
trianglecocoa
5
390
Taming Xcode by Jay Thrash
trianglecocoa
3
180
Other Decks in Programming
See All in Programming
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
190
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
270
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1k
共通化で考えるべきは、実装より公開する型だった
codeegg
0
140
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
200
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.8k
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
240
1B+ /day規模のログを管理する技術
broadleaf
0
130
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
460
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
140
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Ruling the World: When Life Gets Gamed
codingconduct
0
280
Building the Perfect Custom Keyboard
takai
2
810
From π to Pie charts
rasagy
0
230
We Are The Robots
honzajavorek
0
270
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
380
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
エンジニアに許された特別な時間の終わり
watany
107
250k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
180
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!