Dplug
Dplug copied to clipboard
Lack of AU destruction in one of the two AU APIs
if (select == kComponentCloseSelect) // -2
{
destroyFree(cast(void*)this); // free all resources except the runtime
releaseAUFunctions();
return noErr;
}
I'm not sure why it's cast to void*, probably the former destruction code would work but not the newer.
- [x] tested bith former Dplug and numem will call the right subclass destructor
- [x] What did destroyFree(void*) did before? => NOT call the destructor
So the code is intentionally leaking the whole client. I think I remember it would crash else?
Introduced in 4143ebfa31ed596ed952afb274727f9e633e9220
There are two AU API entry points, one leads to a leak but not the other.
- [x] To fix the build, just remove the destructor call to get former behaviour.
- [ ] However, need more testing to know what it actually fixed?