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
230
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
280
Taming Xcode by Jay Thrash
trianglecocoa
3
130
Other Decks in Programming
See All in Programming
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
技術を根付かせる / How to make technology take root
kubode
1
240
Spring gRPC について / About Spring gRPC
mackey0225
0
220
【PHP】破壊的バージョンアップと戦った話〜決断と説得
satoshi256kbyte
0
120
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
110
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
300
『品質』という言葉が嫌いな理由
korimu
0
160
Immutable ActiveRecord
megane42
0
130
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
660
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
7
2.5k
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
400
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
Featured
See All Featured
Designing Experiences People Love
moore
139
23k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Fireside Chat
paigeccino
34
3.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Side Projects
sachag
452
42k
Adopting Sorbet at Scale
ufuk
74
9.2k
Navigating Team Friction
lara
183
15k
What's in a price? How to price your products and services
michaelherold
244
12k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
99
18k
How STYLIGHT went responsive
nonsquared
98
5.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!