Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Memory Management in iOS App Development
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sumin Byeon
September 03, 2009
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Memory Management in iOS App Development
Sumin Byeon
September 03, 2009
More Decks by Sumin Byeon
See All by Sumin Byeon
Cartography 101
suminb
1
62
Big Data in Action
suminb
1
87
Git with Bitbucket
suminb
0
96
RNA Secondary Structure Prediction
suminb
0
170
Other Decks in Programming
See All in Programming
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
160
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
1.4k
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
480
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
420
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
Workers Cache を知る
syumai
0
370
Jetpack Compose Mechanisms
skydoves
3
820
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
490
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
YesSQL, Process and Tooling at Scale
rocio
174
15k
How to build a perfect <img>
jonoalderson
1
6.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Ethics towards AI in product and experience design
skipperchong
2
430
Bash Introduction
62gerente
615
220k
How STYLIGHT went responsive
nonsquared
100
6.3k
Designing for Performance
lara
612
70k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
Memory Management for iPhone Application Development Sumin Byeon (
[email protected]
)
Advanced Topic
Significance Limited memory (128MB, 256MB) No garbage collection No virtual
memory User experience
Related Functions alloc copy retain release autorelease
Alloc Allocates memory for an object, and returns it with
retain count of 1[1]. Almost equivalent to the new keyword in C+ +, Java, etc. [1] http:/ /developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html
Copy Makes a copy of an object, and return retain
count of 1.
Master Theorem #1 If you allocated it, you should release
it. If you didn’t explicitly allocate it, don’t release it.
Example ! NSString *str = [[NSString alloc] initWithCString:"Boom baby"]; !
NSLog(str); ! [str release];
Example ! NSString *str = [NSString stringWithCString:"Boom baby"]; ! NSLog(str);
Retain Increases the retain count of an object by 1.
Release Decreases the retain count of an object by 1.
Master Theorem #2 If an object is being retained by
something else, you may release it immediately. (e.g. [UIView addSubview:view])
Master Theorem #3 Don’t you dare call dealloc. Always call
release, and dealloc will be called when the retain count becomes zero.
Autorelease
Autorelease with Threads
Instruments Charles Magahern (
[email protected]
)
Questions?