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
Identifying User Idenity
moro
6
8k
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
410
Server Driven Compose With Firebase
skydoves
0
400
GCCのプラグインを作る / I Made a GCC Plugin
shouth
1
150
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
9
1k
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
210
僕がつくった48個のWebサービス達
yusukebe
18
17k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
350
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
3
400
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
440
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1k
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
240
Featured
See All Featured
Thoughts on Productivity
jonyablonski
67
4.3k
It's Worth the Effort
3n
183
27k
What's new in Ruby 2.0
geeforr
342
31k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Testing 201, or: Great Expectations
jmmastey
38
7k
A Tale of Four Properties
chriscoyier
156
23k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
A Philosophy of Restraint
colly
203
16k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
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!