Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Memory Management in iOS App Development
Search
Sumin Byeon
September 03, 2009
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
63
Big Data in Action
suminb
1
88
Git with Bitbucket
suminb
0
96
RNA Secondary Structure Prediction
suminb
0
180
Other Decks in Programming
See All in Programming
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
490
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
300
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.1k
Next.js: The final boss of Web Performance
guaca
0
370
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.3k
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
170
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
320
Crash Auto Pipelines
veronikapj
1
190
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
120
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
210
AmebaブログはKMPから卒業します
kmars0605
0
310
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
180
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.3k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
47k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
800
Code Reviewing Like a Champion
maltzj
529
40k
Into the Great Unknown - MozCon
thekraken
41
2.8k
How to make the Groovebox
asonas
2
2.5k
Agile that works and the tools we love
rasmusluckow
331
22k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Faster Mobile Websites
deanohume
310
32k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
A Soul's Torment
seathinner
8
3.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?