Skip to content

Fix unbalanced COM refcount in findAllTypesForFile (#1665)#1675

Open
vlerdf wants to merge 1 commit into
juce-framework:developfrom
vlerdf:fix/vst3-scanner-leak
Open

Fix unbalanced COM refcount in findAllTypesForFile (#1665)#1675
vlerdf wants to merge 1 commit into
juce-framework:developfrom
vlerdf:fix/vst3-scanner-leak

Conversation

@vlerdf

@vlerdf vlerdf commented Jun 18, 2026

Copy link
Copy Markdown

This PR fixes a memory leak where VST3HostContextHeadless instances are leaked when scanning plugins via findAllTypesForFile().

Using IncrementRef::yes on creation increments the refcount to 2, causing the object to persist after the temporary smart pointer goes out of scope. Changing it to IncrementRef::no properly balances the reference count, matching the behavior already present in createPluginInstance().

Fixes #1665.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant