- 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
推薦閱讀
- Python自然語言處理實戰:核心技術與算法
- Raspberry Pi Networking Cookbook(Second Edition)
- Java 11 Cookbook
- Spring Boot進階:原理、實戰與面試題分析
- 批調度與網絡問題的組合算法
- Spring Boot+Vue全棧開發實戰
- 從零開始學UI:概念解析、實戰提高、突破規則
- Puppet:Mastering Infrastructure Automation
- Python全棧開發:基礎入門
- Mastering PowerCLI
- Node.js 6.x Blueprints
- Python機器學習
- Scratch超人漫游記:創意程序設計:STEAM創新教育指南
- The Python Apprentice
- Learning Akka