$30 off During Our Annual Pro Sale. View Details »
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
290
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
260
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
330
Taming Xcode by Jay Thrash
trianglecocoa
3
150
Other Decks in Programming
See All in Programming
WebRTC と Rust と8K 60fps
tnoho
2
1.9k
Cap'n Webについて
yusukebe
0
120
AIコーディングエージェント(Manus)
kondai24
0
160
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
110
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
170
チームをチームにするEM
hitode909
0
290
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
CSC305 Lecture 17
javiergs
PRO
0
340
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
120
生成AIを利用するだけでなく、投資できる組織へ
pospome
0
240
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
230
社内オペレーション改善のためのTypeScript / TSKaigi Hokuriku 2025
dachi023
1
560
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Side Projects
sachag
455
43k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.2k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
How to train your dragon (web standard)
notwaldorf
97
6.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
121
20k
Site-Speed That Sticks
csswizardry
13
990
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Speed Design
sergeychernyshev
33
1.4k
Git: the NoSQL Database
bkeepers
PRO
432
66k
A better future with KSS
kneath
240
18k
How to Ace a Technical Interview
jacobian
280
24k
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!