Skip to content

Leak when repeatedly loading and unloading plugin bundle #941

Description

@edwloef

Version

26.02

Plugin type

CLAP

OS

Linux

DAW / Host (if applicable)

any

Description

When repeatedly loading, initializing, deinitializing and unloading the Cardinal CLAP plugin bundle, each iteration leaves roughly 10MB of memory leaked. Heap profiling a debug build points at this call stack being the culprit:

Image

Presumably, something isn't being properly deinitialized before the bundle is unloaded, and therefore stays present even after the bundle is unloaded?

The DPF implementation of clap_plugin_entry_deinit seems suspicious to me in this context, but I'm unfamiliar with what a ScopedPointer is so that might be an incorrect call:
https://github.com/DISTRHO/DPF/blob/main/distrho/src/DistrhoPluginCLAP.cpp#L2657-L2660

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions