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
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
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
450
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
2
430
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
470
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
370
FastAPI の並行処理モデルを完全に理解する
hoto17296
8
2.8k
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
290
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
Flow は今どうなっているか
mizdra
PRO
0
690
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
170
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
270
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
160
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3.1k
Optimizing for Happiness
mojombo
378
71k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Statistics for Hackers
jakevdp
799
230k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
410
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
260
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
The Curious Case for Waylosing
cassininazir
1
480
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
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!