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
160
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
460
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
270
Taming Xcode by Jay Thrash
trianglecocoa
3
130
Other Decks in Programming
See All in Programming
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
900
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
310
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
170
Zoneless Testing
rainerhahnekamp
0
120
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
300
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
280
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Recoilを剥がしている話
kirik
5
7k
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
160
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
870
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
500
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
4 Signs Your Business is Dying
shpigford
182
21k
Optimizing for Happiness
mojombo
376
70k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Side Projects
sachag
452
42k
Designing for Performance
lara
604
68k
Facilitating Awesome Meetings
lara
50
6.1k
A designer walks into a library…
pauljervisheath
205
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Producing Creativity
orderedlist
PRO
342
39k
Making the Leap to Tech Lead
cromwellryan
133
9k
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!