Dplug icon indicating copy to clipboard operation
Dplug copied to clipboard

Lack of AU destruction in one of the two AU APIs

Open p0nce opened this issue 3 weeks ago • 3 comments

         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.

p0nce avatar Dec 05 '25 12:12 p0nce

  • [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?

p0nce avatar Dec 05 '25 12:12 p0nce

Introduced in 4143ebfa31ed596ed952afb274727f9e633e9220

There are two AU API entry points, one leads to a leak but not the other.

p0nce avatar Dec 05 '25 12:12 p0nce

  • [x] To fix the build, just remove the destructor call to get former behaviour.
  • [ ] However, need more testing to know what it actually fixed?

p0nce avatar Dec 05 '25 12:12 p0nce