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
170
5
Share
Instruments: Leaks by Trevor Brown
Trevor discusses using the leaks tool in Instruments from CocoaHeads September in Durham
Triangle Cocoa
September 27, 2012
More Decks by Triangle Cocoa
See All by Triangle Cocoa
App Store Secrets by Lawrence Ingraham
trianglecocoa
1
330
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
200
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
510
Foundation Collections by Kevin Conner
trianglecocoa
3
280
Multithreaded Drawing by Eric Lanz
trianglecocoa
3
240
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
200
Understanding UIResponder by Dirk Smith
trianglecocoa
5
370
Taming Xcode by Jay Thrash
trianglecocoa
3
170
Other Decks in Programming
See All in Programming
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
180
AIを導入する前にやるべきこと
negima
2
330
AI-DLC Deep Dive
yuukiyo
9
5.6k
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
480
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
4
3.3k
実用!Hono RPC2026
yodaka
2
300
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
1.1k
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
140
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.1k
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
690
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Claude Code のすすめ
schroneko
67
220k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
780
So, you think you're a good person
axbom
PRO
2
2k
KATA
mclloyd
PRO
35
15k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
200
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
160
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
370
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
730
Color Theory Basics | Prateek | Gurzu
gurzu
0
310
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!