自动释放对象和自动释放池(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

 

 

 

 

 

 

 

 

  


分享给朋友:
您可能感兴趣的文章:
随机阅读: