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
370
Taming Xcode by Jay Thrash
trianglecocoa
3
170
Other Decks in Programming
See All in Programming
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.1k
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
390
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
150
色即是空、空即是色、データサイエンス
kamoneggi
1
200
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
120
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
990
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
670
TSKaigi 2026 TypeScriptバックエンドのオブザーバビリティ戦略 — Datadog × NestJSの実践
taiseiyamamotoan
1
200
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
5
690
Modding RubyKaigi for Myself
yui_knk
0
470
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.2k
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
130
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
310
Art, The Web, and Tiny UX
lynnandtonic
304
21k
WENDY [Excerpt]
tessaabrams
10
37k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
KATA
mclloyd
PRO
35
15k
How to build a perfect <img>
jonoalderson
1
5.5k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
260
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
350
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Embracing the Ebb and Flow
colly
88
5k
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!