In Apple API Reference about NSAutoReleasePool https://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/Classes/NSAutoreleasePool_Class/Reference/Reference.html It point that "The Application Kit creates an autorelease pool on the main thread at the beginning of every cycle of the event loop".
It puzzle me. I have three question about this.
1) What's mean "The Application Kit"? UIKit? If "The Application Kit" mean UIKit, then, I create an application which don't use UIkit. Will it create a autoreleasePool on the main thread at the beginning of every cycle of the event loop.
2) Is "On the main thread" mean that On others thread (Not mainThread) will break this rule?
3) Is "event loop" mean runloop ?
# #Add: I write a demo to test it. when I create a thread, will create an autoreleasePool by runloop, automatically?
Then, In Application MainThread, Create a taskThread.
The result:
So, the question 2)Is "On the main thread" mean that On others thread (Not mainThread) will break this rule? In this demo, It's not. The second thread every runloop create an autoreleasePool automatically. Because the autoreleaseObject's dealloc method is called.
Is there any wrong in my demo? It puzzle me.