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
170
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
330
iPhone 5 and You! by Ameir Al-Zoubi
trianglecocoa
0
210
Grand Central Dispatch by Jody Hagins
trianglecocoa
2
520
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
380
Taming Xcode by Jay Thrash
trianglecocoa
3
170
Other Decks in Programming
See All in Programming
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
280
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.7k
JavaDoc 再入門
nagise
1
350
さぁV100、メモリをお食べ・・・
nilpe
0
140
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
200
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
110
New "Type" system on PicoRuby
pocke
1
930
スマートグラスで並列バイブコーディング
hyshu
0
140
AIで効率化できた業務・日常
ochtum
0
140
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6k
net-httpのHTTP/2対応について
naruse
0
490
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
690
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
430
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
210
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Into the Great Unknown - MozCon
thekraken
41
2.6k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
Crafting Experiences
bethany
1
180
Building an army of robots
kneath
306
46k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
200
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
Designing for humans not robots
tammielis
254
26k
The Pragmatic Product Professional
lauravandoore
37
7.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!