diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 0bf6ed0611..a3375a1b24 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -874,7 +874,6 @@ private: if (component != nullptr) { #if JUCE_WINDOWS - component->setVisible (false); component->removeFromDesktop(); #else if (macHostWindow != nullptr) diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index d7eb8e8bea..a8d52d9cc9 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -700,6 +700,8 @@ void Component::removeFromDesktop() if (flags.hasHeavyweightPeerFlag) { + ComponentHelpers::releaseAllCachedImageResources (*this); + auto* peer = ComponentPeer::getPeerFor (this); jassert (peer != nullptr);