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
290
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
180
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
480
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
スタートアップを支える技術戦略と組織づくり
pospome
8
8.8k
What's New in Web AI?
christianliebel
PRO
0
130
Patterns of Patterns (and why we need them)
denyspoltorak
0
110
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
11
5.3k
Micro Frontendsで築いた 共通基盤と運用の試行錯誤 / Building a Shared Platform with Micro Frontends: Operational Learnings
kyntk
0
100
PHPライセンス変更の議論を通じて学ぶOSSライセンスの基礎
matsuo_atsushi
0
170
複数チーム並行開発下でのコード移行アプローチ ~手動 Codemod から「生成AI 活用」への進化
andpad
0
180
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
1
150
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
490
AI時代もSEOを頑張っている話
shirahama_x
0
140
Nitro v3
kazupon
2
320
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
250
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Code Reviewing Like a Champion
maltzj
527
40k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Designing Experiences People Love
moore
142
24k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
A Tale of Four Properties
chriscoyier
162
23k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Mobile First: as difficult as doing things right
swwweet
225
10k
Designing for humans not robots
tammielis
254
26k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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!