Re: Preset leaks cocoa UI resources.
Re: Preset leaks cocoa UI resources.
- Subject: Re: Preset leaks cocoa UI resources.
- From: 吉田光宏 <email@hidden>
- Date: Wed, 15 Dec 2010 18:04:32 +0900
Thanks for your reply,
The previous code is only a test , so it doesn't use an NSTimer.
But even though I am not using NSTimer in this test code, dealloc is not being called after I select a preset and then close the GUI.
So that made me believe that it is not related to NSTimer.
Is this supposed to occur?
On 10/12/15 15:57, Brian Willoughby wrote:
> Mitsuhiro,
>
> If you are using NSTimer with the target: set to point to an instance of your TestAudioUnit_CocoaView, then the behavior you describe is probably exactly as
> expected. This is exactly what Tahome was trying to point out.
>
> I think perhaps you should look into breaking down the NSTimer, maybe before and after a new preset is loaded. Or look for a code path where the NSTimer is
> possibly holding on to a reference for the TestAudioUnit_CocoaView.
>
> Keep in mind that -dealloc is only ever called once, and that's after every reference has been released. If the NSTimer is holding on to the
> TestAudioUnit_CocoaView instance as its target, then the TestAudioUnit_CocoaView will never be released.
>
> In other words, you have some decent debugging in there, but you might want to do some additional debugging with regard to the NSTimer (or any other mechanism
> which might retain your TestAudioUnit_CocoaView instance).
>
> Brian Willoughby
> Sound Consulting
>
>
> On Dec 14, 2010, at 18:15, Mitsuhiro Yoshida wrote:
>> Normaly, when CocoaView will appear, "setAU was called." log is written, and when CocoaView will disappear,
>> "dealloc was called." log is written.
>> But after I select preset from plugin's preset menu,
>> even if I remove the plugin from Logic, CocoaView's dealloc log wasn't written.
>>
>> So I think this is Logic's bug.
>>
>>
>> On 10/12/14 20:03, tahome izwah wrote:
>>> I'd start by overriding -release and -retain to see if this is really
>>> a Logic problem and not just something that was there all along and
>>> gets exposed in the latest version. Keep in mind that NSTimer retains
>>> its parent class, so you might end up with a situation where neither
>>> gets dealloc'd.
>>>
>>> --th
>>>
>>> 2010/12/14 Mitsuhiro Yoshida <email@hidden>:
>>>> Hi, there.
>>>>
>>>> I found that after I select preset from plugins menu, then Cocoa UI's dealloc wasn't called.
>>>> So, My plugin leaks resources. Actually I need to use NSTimer, so when
>>>> I use select menu, NSTimer leaked, and I got messy result.
>>>> This problem is reproduced only on Logic 9.1.3.
>>>> Logic 9.0.0 or Logic 9.1.0 doesn't have this problem.
>>>>
>>>> So, I think this is bug of Logic 9.1.3
>
>
--
-------------------------------------------
吉田光宏(Mitsuhiro Yoshida)
株式会社モアソンジャパン
-------------------------------------------
_______________________________________________
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