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
170
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
REALITY コマンド作成チュートリアル
nishiuriraku
0
120
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
6
1.5k
Laravel × Clean Architecture
bumptakayuki
PRO
0
130
20250426 GDGoC 合同新歓 - GDGoC のススメ
getty708
0
110
2ヶ月で生産性2倍、お買い物アプリ「カウシェ」4チーム同時改善の取り組み
ike002jp
1
110
Dissecting and Reconstructing Ruby Syntactic Structures
ydah
3
2k
Serving TUIs over SSH with Go
caarlos0
0
570
状態と共に暮らす:ステートフルへの挑戦
ypresto
3
1.1k
プロダクト横断分析に役立つ、事前集計しないサマリーテーブル設計
hanon52_
3
540
flutter_kaigi_mini_4.pdf
nobu74658
0
140
Browser and UI #2 HTML/ARIA
ken7253
2
170
Make Parsers Compatible Using Automata Learning
makenowjust
2
6.9k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
230
18k
Statistics for Hackers
jakevdp
798
220k
For a Future-Friendly Web
brad_frost
177
9.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Practical Orchestrator
shlominoach
187
11k
Unsuck your backbone
ammeep
671
57k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
410
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Typedesign – Prime Four
hannesfritz
41
2.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.5k
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!