摘要:
Application LifecycleAfter application:didFinishLaunchingWithOptions:, then what?Application enters a “run loop” repeatedly doing the following ...An autorelease pool is created (more on this in a moment)Application waits for events (touch, timed event, I/O, etc.)Events are dispatched through UIKit 阅读全文
摘要:
Autoreleasing Objects• Calling -autorelease flags an object to be sent release at somepoint in the future• Let’s you fulfill your retain/release obligations while allowing anobject some additional time to live• Makes it much more convenient to manage memory• Very useful in methods which return a new 阅读全文
摘要:
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 阅读全文