Next: Terminating your application Up: The shared application object Previous: Setting a delegate for

The run loop of your application

When you call NSApplicationMain (), the GUI library ``runs'' your application. When the application is running, the GUI library simply enters a loop waiting for events from the user (such as the user clicking on a window, on a menu, or on the application icon). It creates an autorelease pool at the beginning of each loop, and empties it at the end; this means you don't have to worry about manually creating and emptying autorelease pools in your gui application once it is running.

Of course, if you run an application without having created any windows or menus, the application will wait indefinitely since the user has no means of communicating with it.



Nicola Pero 2000-07-21