$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
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
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
JETLS.jl ─ A New Language Server for Julia
abap34
1
400
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
AWS CDKの推しポイントN選
akihisaikeda
1
240
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
330
認証・認可の基本を学ぼう後編
kouyuume
0
190
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
160
TestingOsaka6_Ozono
o3
0
150
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
2.6k
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
270
React Native New Architecture 移行実践報告
taminif
1
150
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
140
チームをチームにするEM
hitode909
0
330
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Music & Morning Musume
bryan
46
7k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Statistics for Hackers
jakevdp
799
230k
Embracing the Ebb and Flow
colly
88
4.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Automating Front-end Workflow
addyosmani
1371
200k
For a Future-Friendly Web
brad_frost
180
10k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Making Projects Easy
brettharned
120
6.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
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!