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:
parent
706d80216b
commit
2f04d6a846
1 changed files with 0 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue