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
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
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
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.4k
The free-lunch guide to idea circularity
hollycummins
0
390
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
KagglerがMixSeekを触ってみた
morim
0
360
20260320登壇資料
pharct
0
140
Java 21/25 Virtual Threads 소개
debop
0
310
Nuxt Server Components
wattanx
0
230
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
270
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
240
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
Rethinking API Platform Filters
vinceamstoutz
0
4.6k
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
210
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.1k
AI: The stuff that nobody shows you
jnunemaker
PRO
4
500
Google's AI Overviews - The New Search
badams
0
950
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
300
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
190
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
Discover your Explorer Soul
emna__ayadi
2
1.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
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?