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
AI時代の認知負荷との向き合い方
optfit
0
150
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
940
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
930
CSC307 Lecture 06
javiergs
PRO
0
680
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
190
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
400
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
680
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
Featured
See All Featured
Building Applications with DynamoDB
mza
96
6.9k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
We Are The Robots
honzajavorek
0
160
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
72
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Claude Code のすすめ
schroneko
67
210k
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?