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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sumin Byeon
September 03, 2009
Programming
0
130
Memory Management in iOS App Development
Sumin Byeon
September 03, 2009
Tweet
Share
More Decks by Sumin Byeon
See All by Sumin Byeon
Cartography 101
suminb
1
59
Big Data in Action
suminb
1
73
Git with Bitbucket
suminb
0
94
RNA Secondary Structure Prediction
suminb
0
160
Other Decks in Programming
See All in Programming
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8k
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
160
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
350
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
160
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
580
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
170
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
5
1k
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
130
AIプロダクト時代のQAエンジニアに求められること
imtnd
2
720
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
520
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
200
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
320
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
68
Unsuck your backbone
ammeep
672
58k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The Cost Of JavaScript in 2023
addyosmani
55
9.7k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
220
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Amusing Abliteration
ianozsvald
0
120
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
230
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
500
Docker and Python
trallard
47
3.8k
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?