`
简单的茶
  • 浏览: 85870 次
  • 性别: Icon_minigender_2
  • 来自: 昆明
社区版块
存档分类
最新评论

AutoReleasePool 学习笔记

 
阅读更多
1. In a reference-counted environment, an NSAutoreleasePool contains objects that have received autorelease message. When the pool drained, it sends release message to each of the objects.

2. The Application Kit creates an autorelease pool for main thread at the beginning of every cycle of the event loop. We can create "local" autorelease pool.

3. Can NOT retain or autorelease an autorelease pool.

4.  Should always drain an autorelease pool in the same context that it was created.

4. Each thread maintains its own stack of NSAutoreleasePool objects.  When a thread terminates, it automatically drains all of the autorelease pools associated with itself.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics