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
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
Fluid Templating in TYPO3 14
s2b
0
130
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
Implementation Patterns
denyspoltorak
0
290
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
Data-Centric Kaggle
isax1015
2
780
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
200
AgentCoreとHuman in the Loop
har1101
5
240
Oxlint JS plugins
kazupon
1
970
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
120
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
590
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Side Projects
sachag
455
43k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
[SF Ruby Conf 2025] Rails X
palkan
1
760
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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!