Re: Warnings and tips for using AUGenericView
Re: Warnings and tips for using AUGenericView
- Subject: Re: Warnings and tips for using AUGenericView
- From: Christopher Ashworth <email@hidden>
- Date: Thu, 7 Aug 2008 17:04:15 -0400
On Aug 7, 2008, at 3:38 PM, Christopher Ashworth wrote:
4) The viewWillMoveToWindow bug that leads to a crash, originally
described here:
http://lists.apple.com/archives/coreaudio-api/2007/Nov/msg00019.html
still exists, so be careful how you manipulate your views.
Additionally:
This crash occurs when a call to AUGenericView's viewWillMoveToWindow:
is given nil for the new window. Attempting to avoid this crash by
subclassing AUGenericView does not appear to be possible, because the
retain count of the view is modified by AUGenericView's implementation
of viewWillMoveToWindow. Basically, the permutations are as follows:
- by default, if you try to remove an AUGenericView from its
superview, viewWillMoveToWindow will be called with a nil newWindow
and you'll crash
- if you subclass AUGenericView and override viewWillMoveToWindow: to
avoid passing it along only when newWindow is nil, the view will work
(including updating controls while the AU runs), but the view will
never be released.
- if you subclass AUGenericView and override viewWillMoveToWindow: to
avoid *ever* passing it along to AUGenericView, the view will
basically work and not get leaked, except that the controls in the
view will not be updated while the AU runs.
If anyone knows some clever way to make AUGenericView usable I'd love
to hear it. Otherwise it appears I'll need to re-implement my own
version of it.
Thanks,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden