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
180
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
340
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
220
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
520
Foundation Collections by Kevin Conner
trianglecocoa
3
290
Multithreaded Drawing by Eric Lanz
trianglecocoa
3
240
Unburdened ViewControllers by Jay Thrash
trianglecocoa
9
11k
Automated Acceptance Testing by Josh Johnson
trianglecocoa
4
210
Understanding UIResponder by Dirk Smith
trianglecocoa
5
400
Taming Xcode by Jay Thrash
trianglecocoa
3
180
Other Decks in Programming
See All in Programming
プロポーザルを書いてもらう
pvcresin
0
580
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
150
typoなんかねぇよ
raspython3
0
550
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
220
メールのエイリアス機能を履き違えない
isshinfunada
0
260
ALB ログから Trace を気合で繋げる技術
fohte
6
640
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
580
「人を評価する AI」の設計と実装
ryoyanara
0
240
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
730
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
510
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
260
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Visualization
eitanlees
152
17k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Odyssey Design
rkendrick25
PRO
2
780
Build your cross-platform service in a week with App Engine
jlugia
234
19k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
440
The SEO Collaboration Effect
kristinabergwall1
1
530
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
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!