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
260
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
160
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
460
Foundation Collections by Kevin Conner
trianglecocoa
3
230
Multithreaded Drawing by Eric Lanz
trianglecocoa
3
200
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
170
Understanding UIResponder by Dirk Smith
trianglecocoa
5
280
Taming Xcode by Jay Thrash
trianglecocoa
3
130
Other Decks in Programming
See All in Programming
今から始めるCursor / Windsurf / Cline
kengo_hayano
0
100
英語文法から学ぶ、クリーンな設計の秘訣
newnomad
1
260
DenoでOpenTelemetryに入門する
yotahada3
2
280
AHC 044 混合整数計画ソルバー解法
kiri8128
0
290
体得しよう!RSA暗号の原理と解読
laysakura
3
500
「その気にさせる」エンジニアが 最強のリーダーになる理由
gimupop
3
470
ベクトル検索システムの気持ち
monochromegane
28
8.2k
ステートソーシング型イベント駆動の視点で捉えるCQRS+ES
shinnosuke0522
1
300
Devinのメモリ活用の学びを自社サービスにどう組み込むか?
itarutomy
0
1.3k
PHPによる"非"構造化プログラミング入門 -本当に熱いスパゲティコードを求めて- #phperkaigi
o0h
PRO
0
960
AI時代のプログラミング教育 / programming education in ai era
kishida
22
20k
Day0 初心者向けワークショップ実践!ソフトウェアテストの第一歩
satohiroyuki
0
160
Featured
See All Featured
Speed Design
sergeychernyshev
28
850
Building Adaptive Systems
keathley
40
2.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
460
RailsConf 2023
tenderlove
29
1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Code Reviewing Like a Champion
maltzj
521
39k
Git: the NoSQL Database
bkeepers
PRO
429
65k
Become a Pro
speakerdeck
PRO
26
5.2k
Raft: Consensus for Rubyists
vanstee
137
6.8k
What's in a price? How to price your products and services
michaelherold
244
12k
Embracing the Ebb and Flow
colly
84
4.6k
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!