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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Triangle Cocoa
September 27, 2012
Programming
5
170
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
300
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
200
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
500
Foundation Collections by Kevin Conner
trianglecocoa
3
270
Multithreaded Drawing by Eric Lanz
trianglecocoa
3
230
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
190
Understanding UIResponder by Dirk Smith
trianglecocoa
5
350
Taming Xcode by Jay Thrash
trianglecocoa
3
160
Other Decks in Programming
See All in Programming
CSC307 Lecture 04
javiergs
PRO
0
660
高速開発のためのコード整理術
sutetotanuki
1
410
CSC307 Lecture 06
javiergs
PRO
0
690
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
Oxlint JS plugins
kazupon
1
980
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
Architectural Extensions
denyspoltorak
0
300
Package Management Learnings from Homebrew
mikemcquaid
0
230
CSC307 Lecture 07
javiergs
PRO
1
560
Data-Centric Kaggle
isax1015
2
780
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.6k
Featured
See All Featured
Music & Morning Musume
bryan
47
7.1k
Speed Design
sergeychernyshev
33
1.5k
We Are The Robots
honzajavorek
0
170
The SEO Collaboration Effect
kristinabergwall1
0
350
A better future with KSS
kneath
240
18k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
Producing Creativity
orderedlist
PRO
348
40k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
Thoughts on Productivity
jonyablonski
74
5k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
270
Building AI with AI
inesmontani
PRO
1
700
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!