- Objective-C Memory Management Essentials
- Gibson Tang Maxim Vasilkov
- 112字
- 2021-07-23 20:09:13
Chapter 3. Using Autorelease Pools
Consider that you are returning an object you've created (and therefore own) to a caller. If it's released inside your method, the returning object will be an invalid one. On the other hand, there is the basic rule that you have to release the objects you own; then, how do you release them? Simply put the object in the autorelease pool. The object is then released when the autorelease pool is drained.
We will cover the following topics in this chapter:
- Understanding the autorelease pool mechanism
- How autorelease pool helps
- Autoreleased classes
- Autoreleased pool blocks and threads
- Memory model in Objective-C
- ARC with weak references
推薦閱讀
- Interactive Data Visualization with Python
- AngularJS Web Application Development Blueprints
- Oracle BAM 11gR1 Handbook
- 人人都懂設計模式:從生活中領(lǐng)悟設計模式(Python實現(xiàn))
- 零基礎入門學習Python
- Visual Basic程序設計實驗指導(第二版)
- 區(qū)塊鏈技術(shù)與應用
- Mastering openFrameworks:Creative Coding Demystified
- 時空數(shù)據(jù)建模及其應用
- jQuery for Designers Beginner's Guide Second Edition
- Oracle實用教程
- LabVIEW數(shù)據(jù)采集
- Python Machine Learning Cookbook
- Access數(shù)據(jù)庫應用教程(2010版)
- Modular Programming with JavaScript