Re: AXObserverRemoveNotification sometimes painfully slow [Follow up to] Hidden Cocoa apps have empty kAXWindowsAttribute
Re: AXObserverRemoveNotification sometimes painfully slow [Follow up to] Hidden Cocoa apps have empty kAXWindowsAttribute
- Subject: Re: AXObserverRemoveNotification sometimes painfully slow [Follow up to] Hidden Cocoa apps have empty kAXWindowsAttribute
- From: Matt Gough <email@hidden>
- Date: Wed, 26 Mar 2003 18:05:36 +0000
>
> I was thinking though, as long as I eventually CFRelease the observer
>
> itself, do I still need to AXObserverRemoveNotification on each
>
> notification
>
> it is interested in. i.e. will it still leak if I don't. Currently I
>
> have
>
> one observer per application I am observing and when that app quits,
>
> the
>
> observer is released. Surely this should clean everything up, and if it
>
> doesn't wouldn't that be considered a bug?
>
>
This should be fine.
Let me just clarify what my app is doing so that I can be sure that it is
indeed fine.
My app creates one observer per other application (lets call the observer
Bernard). Bernard is set up to be notified of kAXWindowCreatedNotification.
Once my app notices that another app has got a window that I am interested
in keeping track of, I install kAXUIElementDestroyedNotification for that
window's AXUIElement on Bernard .
Once the app quits (or I lose interest in it as a whole) I call CFRelease on
Bernard.
Given this scenario, is it correct that there should be no memory leaks once
Bernard is released?
Assuming it is correct, roughly how much memory will be being wasted per
window that has been destroyed before Bernard is released (i.e. the user
never quits an app, but opens and closes (or hides) windows a lot)
Matt
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.