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
130
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
250
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
150
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
450
Foundation Collections by Kevin Conner
trianglecocoa
3
220
Multithreaded Drawing by Eric Lanz
trianglecocoa
3
190
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
160
Understanding UIResponder by Dirk Smith
trianglecocoa
5
260
Taming Xcode by Jay Thrash
trianglecocoa
3
130
Other Decks in Programming
See All in Programming
Vertical Architectures for Scalable Angular Applications
manfredsteyer
PRO
0
240
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
160
GPU Hash Table | レイトレ合宿10
yknishidate
0
350
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
3
160
本編では話さない Zig の話
andpad
2
130
Новый уровень ML-персонализации Lamoda: Как мы усилили ее в каталоге и перенесли на другие продукты
lamodatech
0
420
The future of development – Are our jobs getting harder or easier?
hollycummins
1
220
今日で分かる!カスタムコップの作り方
krpk1900
2
320
現場から考えるソフトウェアエンジニアリングの価値と実験
nomuson
1
160
20241004 モノタロウ式~ドメインモデリングとリアーキテクチャ
monotaro
PRO
2
700
How to debug Xdebug... or any other weird bug in PHP
dunglas
2
1.5k
レイトレ合宿10 レンダラー紹介 / Renderer Introduction, Ray Tracing Camp 10
shocker_0x15
0
650
Featured
See All Featured
Happy Clients
brianwarren
97
6.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
It's Worth the Effort
3n
183
27k
Six Lessons from altMBA
skipperchong
26
3.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
Become a Pro
speakerdeck
PRO
24
4.9k
A better future with KSS
kneath
237
17k
Docker and Python
trallard
40
3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
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!