05-19-2025 04:26 AM
I have a top level VI that dynamically calls plugins as PPLs. Each PPL contains a single class which is a child of a class of a parent PPL. The parent class contains an overridable Plugin Core.vi. Basically, it is a factory pattern style architecture.
The problem I'm having is that in the development environment, even if all VIs are stopped and closed, the called plugins remain in memory. They appear in Dependencies -> Items in Memory.
I can't share the full code but the core is like this:
Selecting the plugin:
The core VI, since start asynchronous call can't call dynamic dispatch VIs:
How can I release the called plugins from memory once they are no longer running? It is very annoying since I have to close the large project every time I want to rebuild the plugin.
05-19-2025 05:36 AM - edited 05-19-2025 05:40 AM
@Basjong53 wrote:
[...]
How can I release the called plugins from memory once they are no longer running? It is very annoying since I have to close the large project every time I want to rebuild the plugin.
There was a similar question a few weeks ago (https://forums.ni.com/t5/LabVIEW/Release-called-class-from-memory/m-p/4431885).
And I am sorry, but there seems to be no way to release a loaded class.
https://forums.ni.com/t5/LabVIEW/Release-called-class-from-memory/m-p/4432372#M1307447
https://lavag.org/topic/8280-can-i-destroy-an-lvoop-class/
Edit: https://forums.ni.com/t5/LabVIEW-Development-Best/Factory-Pattern/tac-p/3492065/highlight/true#M72