# Unload a VST3?

**URL:** <https://forum.juce.com/t/unload-a-vst3/62639>\
**Category:** Audio Plugins\
**Created:** [August 28, 2024, 4:11am UTC](https://forum.juce.com/t/unload-a-vst3/62639 "2024-08-28T04:11:22Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [September 9, 2024, 11:45am UTC](https://forum.juce.com/t/unload-a-vst3/62639/16 "2024-09-09T11:45:36Z")

</div>

It looks like JUCE used to use pure ref-counting to manage module lifetimes, and the current caching mechanism was added to work around issues with some buggy plugins that weren’t correctly shutting down the Obj-C runtime on when they were unloaded:

> [@\[BUG\] JUCE 6 crashes on VST3 delete with open windows, JUCE 5 does not](https://forum.juce.com/t/bug-juce-6-crashes-on-vst3-delete-with-open-windows-juce-5-does-not/40761):
>
> Could someone from the JUCE team please take a look at this? I’m having a problem with my VST3 crashing on delete now that I have moved to JUCE 6. I created this very simple audio plugin project to demonstrate what appears to be a bug in JUCE 6.01: [PluginWithWindow.zip](https://forum.juce.com/uploads/short-url/g8L6NXzbcS6R17D1Ivkq4XMsK3T.zip) (27.6 KB) In AudioPluginHost, deleting this filter (VST3) with the editor windows open will crash in [NSApp run] (which is I guess Mac stuff). I cannot get anywhere with debugging this. This does not happen in JUCE 5.4.7. Als…

I agree the holding onto module handles indefinitely is not a good idea, but we need to test whether removing the global cache breaks some plugins. If it does, then we’d need to weigh up whether it’s more valuable to continue supporting those plugins, or to improve the memory usage of hosts.

---

_[View the full topic](https://forum.juce.com/t/unload-a-vst3/62639)._
