From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
dsavir

Add an option to remove items in memory

Status: New

After deleting items I don't want in the project, or loading plugins in a  plugin architecture, I want to remove them from the LabVIEW memory. This is not possible now, as they go into Dependencies->Items in Memory.

Items in memory.PNG

The only way to do this now is to close and open the project, which over a large Plug-in architecture project is a real pain. 

Ideally, I would like to right click the folder and choose "remove from memory". However, any option that allows this would be good.

 

Thank you!

Danielle

 

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
6 Comments
AristosQueue (NI)
NI Employee (retired)

The "items in memory" should unload unless they are now dependencies of something in memory. One way this happens is if those items in memory contain classes that are child classes of items in your actual project. We cannot unloade a class once it is loaded unless its ancestor class is also able ot unload. The reason is that the child class instances can be scattered everywhere, in the current operate value of controls, in the last value of uninitialized shift registers, in the final display of probes, etc. Unraveling that usage is non-trivial (it is, so far as I know, an operation only supported OO languages that are garbage collected languages, which have significant performance overhead).

 

I fully understand why you would like to have this feature. Research continues to find more paletable technical tradeoffs than those known today.

 

 

dsavir
Active Participant

By definition, plug-in classes would be children of items in the actual project 😞 maybe there a way to clear all the memory, .i.e. do the same thing as when closing and opening the project? This would obviously include previous run values, uninitialized shift registers,etc, so perhaps a better term would be "clear all memory" and not only the things that appear in this folder.

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
Intaris
Proven Zealot

Yeah, currently there's no way to unload a class loaded in this fashion.

 

Definitely something which should be on the "to do" list IMHO.

JimChretz
Active Participant

Very annoying when you update VIs from Tortoise/SVN and you need to close/reopen your project...

PWoodward
NI Employee (retired)

I'm also running into this for plugin architectures, it would be good to have an Unload/Load option for each class/package. The functionality for this is in LV when there is a conflict, but when there is no conflict you can't unload/load.

Certified LabVIEW Architect
AristosQueue (NI)
NI Employee (retired)

PWoodward: the functionality is available when there's a conflict because the classes are not loaded in that case. They're listed in the project, but are not in memory. They can therefore be removed without the need for unload.

 

The class will automatically unload if you have closed all the panels AND if the class is truly unused everywhere. Operate values may be holding the class in memory. The "clear everything everywhere" described by dsavir above would be needed to get an otherwise-unused class to leave memory.