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
320
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
230
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
200
Understanding UIResponder by Dirk Smith
trianglecocoa
5
360
Taming Xcode by Jay Thrash
trianglecocoa
3
170
Other Decks in Programming
See All in Programming
AI-DLC Deep Dive
yuukiyo
1
200
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
220
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
200
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
150
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
230
ファインチューニングせずメインコンペを解く方法
pokutuna
0
300
Swift Concurrency Type System
inamiy
0
460
KagglerがMixSeekを触ってみた
morim
0
370
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
240
Feature Toggle は捨てやすく使おう
gennei
0
560
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
200
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
300
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
470k
Darren the Foodie - Storyboard
khoart
PRO
3
3.2k
The SEO Collaboration Effect
kristinabergwall1
0
420
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
What's in a price? How to price your products and services
michaelherold
247
13k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
790
Navigating Weather and Climate Data
rabernat
0
160
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
350
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.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!