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
160
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
190
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
490
Foundation Collections by Kevin Conner
trianglecocoa
3
270
Multithreaded Drawing by Eric Lanz
trianglecocoa
3
220
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
190
Understanding UIResponder by Dirk Smith
trianglecocoa
5
340
Taming Xcode by Jay Thrash
trianglecocoa
3
160
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
Developing static sites with Ruby
okuramasafumi
0
330
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
160
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
240
AIエージェントの設計で注意するべきポイント6選
har1101
6
2.7k
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
300
Graviton と Nitro と私
maroon1st
0
150
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.5k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
210
PC-6001でPSG曲を鳴らすまでを全部NetBSD上の Makefile に押し込んでみた / osc2025hiroshima
tsutsui
0
200
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
540
チームをチームにするEM
hitode909
0
420
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
0
190
Leo the Paperboy
mayatellez
0
1.3k
It's Worth the Effort
3n
187
29k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
WCS-LA-2024
lcolladotor
0
390
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Deep Space Network (abreviated)
tonyrice
0
30
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.4k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
36
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
0
68
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
770
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!