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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Sumin Byeon
September 03, 2009
Programming
0
120
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
57
Big Data in Action
suminb
1
71
Git with Bitbucket
suminb
0
94
RNA Secondary Structure Prediction
suminb
0
160
Other Decks in Programming
See All in Programming
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
530
Oxlintはいいぞ
yug1224
5
1.3k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
690
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
今から始めるClaude Code超入門
448jp
8
8.6k
Oxlint JS plugins
kazupon
1
890
Package Management Learnings from Homebrew
mikemcquaid
0
220
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
160
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
698
190k
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
It's Worth the Effort
3n
188
29k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
80
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Embracing the Ebb and Flow
colly
88
5k
Typedesign – Prime Four
hannesfritz
42
2.9k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
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?