1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-26 02:14:22 +00:00

VST3 Client: Fix leak caused by unnecessary manual refcounting

In older versions of the VST3SDK, hostContext is a raw pointer,
in newer versions it's a smart pointer. If we do manual
refcounting with the smart pointer, we may cause leaks.
This commit is contained in:
reuk 2021-05-19 23:33:55 +01:00
parent 706d80216b
commit 2f04d6a846
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -652,16 +652,8 @@ public:
tresult PLUGIN_API initialize (FUnknown* context) override
{
if (hostContext != context)
{
if (hostContext != nullptr)
hostContext->release();
hostContext = context;
if (hostContext != nullptr)
hostContext->addRef();
}
return kResultTrue;
}