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
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
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
61
Big Data in Action
suminb
1
80
Git with Bitbucket
suminb
0
94
RNA Secondary Structure Prediction
suminb
0
170
Other Decks in Programming
See All in Programming
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
0
100
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
6
1.1k
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
120
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
2.3k
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
720
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
290
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
120
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
150
バックエンドにElysiaJSを採用して気付いた、良い点・悪い点
wanko_it
1
170
Zod v4 Codec でスキーマに型変換を埋め込む REST API 設計 #TSKaigi2026
ryutaro_yako
0
140
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
360
要はバランスからの卒業 #yumemi_grow
kajitack
0
190
Featured
See All Featured
Building Adaptive Systems
keathley
44
3k
HDC tutorial
michielstock
2
670
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
130
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
150
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
460
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
The agentic SEO stack - context over prompts
schlessera
0
780
Why Our Code Smells
bkeepers
PRO
340
58k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
750
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?