Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Event Handler UPP question



Hello,
I have a question about the way EventHandler UPP's work. In order to install an event handler, say to a window, you have to make a UPP for the handler function. Then you call InstallEventHandler to attach it to the window. Later, if you need to, you can remove the handler by using the Ref that is returned from the Install.

In my program, there is a point where I remove the handlers for a window, and I install different ones. This can happen several times during the program's running. My question:

Do the calls to NewEventHandlerUPP() reserve memory that I should be freeing? When should I free it? If the function that installs the handlers gets called many times, do I have a memory leak?

Thanks
Bob
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.