自动释放对象和自动释放池(2)

How does -autorelease work?
• Object is added to current autorelease pool
• Autorelease pools track objects scheduled to be released
  ■ When the pool itself is released, it sends -release to all its objects
• UIKit automatically wraps a pool around every event dispatch

 

 

 

 

 

 

 

  

原文地址:https://www.cnblogs.com/alexfan/p/2112877.html