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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to