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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
3Dシーンの圧縮
fadis
1
340
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
270
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
150
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
130
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
760
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
130
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
6
1.2k
Claspは野良GASの夢をみるか
takter00
0
120
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
210
色即是空、空即是色、データサイエンス
kamoneggi
1
200
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
570
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
9
2.5k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Un-Boring Meetings
codingconduct
0
300
How to build a perfect <img>
jonoalderson
1
5.5k
Designing Experiences People Love
moore
143
24k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
Producing Creativity
orderedlist
PRO
348
40k
What's in a price? How to price your products and services
michaelherold
247
13k
The Cult of Friendly URLs
andyhume
79
6.9k
Embracing the Ebb and Flow
colly
88
5k
Documentation Writing (for coders)
carmenintech
77
5.3k
Writing Fast Ruby
sferik
630
63k
Six Lessons from altMBA
skipperchong
29
4.2k
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!