• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Apple Events and automatic AutoReleasePool managment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apple Events and automatic AutoReleasePool managment


  • Subject: Apple Events and automatic AutoReleasePool managment
  • From: Andy Klepack <email@hidden>
  • Date: Mon, 17 Mar 2008 11:38:34 -0700
  • Acceptlanguage: en-US
  • Thread-topic: Apple Events and automatic AutoReleasePool managment

The Memory Management Programming Guide (http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concepts/AutoreleasePools.html#//apple_ref/doc/uid/20000047) states "The Application Kit automatically creates a pool at the beginning of an event cycle (or event-loop iteration), such as a mouse down event, and releases it at the end, so your code normally does not have to worry about them".

Does an 'event cycle' then include anything dispatched from a run loop source? For instance, if I was to create a kqueue, create a run loop source for it, and add that to the main run loop, does an AutoReleasePool automatically get created before the handler is called and destroyed after it returns? What about for invocations that result from DO communication in which the incoming port is registered on the main run loop?

I'm also unclear on whether incoming Apple Events are dispatched in the same way as other events. Is their entrance represented as yet another run loop source or is it a separate mechanism? What does this imply about the existence of an AutoReleasePool during the callback? Does it make a difference if the handler was registered via AEInstallEventHandler and NSAppleEventManager's setEventHandler?

Many thanks,
-Andy

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Apple Events and automatic AutoReleasePool managment
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: strange "lockFocus sent to a view whose window is deferred" error with an NSOutlineView on Tiger
  • Next by Date: Re: Best Way To Lookup From a Huge Table
  • Previous by thread: Re: NSTreeController & NSOutlineView bindings w/ Core Data
  • Next by thread: Re: Apple Events and automatic AutoReleasePool managment
  • Index(es):
    • Date
    • Thread