Jump to content

Project that won't let go of some LVClass Dependencies


Recommended Posts

I'm seeing a strange problem with my LabVIEW project. Here's what's going on.

I have several classes that were created with the OpenG Reference Object Template. If I have my project open and I load one of these classes into memory (either by opening the LVClass or opening a VI that calls a class member), the LVClass gets added to the Dependencies>>Items in Memory folder. However, when I close the LVClass (or the VI that calls the class members) it does not get removed from the Dependencies>>Items in Memory folder and I have no way of getting rid of it. Worse, if I save the project, close it, and then reopen it, the LVClass still shows up in the Dependencies>>Items in Memory and gets loaded into memory.

Has anyone seen anything similar?

Link to comment

Here is a test project called "TestProject". Note that it depends on the OpenG Class Templates for LabVIEW Object-Oriented Programming being installed using VIPM (but does not requite the Endevo GDS to be installed).

Download File:post-17-1189555403.zip

Note that it has a Parent class with two child classes Child1 and Child2. If you remove either Parent, Child1, or Child2, they will stay in memory (as seen under the Dependencies>>Items in Memory) until all three classes are removed from the project.

post-17-1189555709.png?width=400

Link to comment
  • 1 month later...
  • 1 month later...

I'm glad I found this topic because I just encountered the same thing.

A couple notes: The child classes stayed in memory until I deleted the parent even though I changed their inheritance so they no longer inherited from the parent! Moreover, when I opened the .ctl file for one of the (disinherited) child classes in the Items In Memory folder I was not able to close the .ctl window.

Link to comment

QUOTE(Tomi Maila @ Dec 12 2007, 11:50 AM)

It seems I've missed this topic. There is a simple workaround. Simply open the .lvclass file with a text editor and remove the lines in the items in memory section within the lvclass XML file. Next time you open the class, everything works smoothly.

Yes, that works for me too. I mentioned that at the bottom of my original post ;)

Cheers,

Link to comment

QUOTE(Paul_at_Lowell @ Dec 12 2007, 01:42 PM)

A couple notes: The child classes stayed in memory until I deleted the parent even though I changed their inheritance so they no longer inherited from the parent! Moreover, when I opened the .ctl file for one of the (disinherited) child classes in the Items In Memory folder I was not able to close the .ctl window.

A class will stay in memory as long as there are any data instances of the class lingering around on VIs that aren't members of the class. That means hiding in the operate data of controls/indicators (controls of type LabVIEW Object or LVVariant are common hiding places), or even just sitting in terminals.

The inability to close the .ctl window is a new one. I haven't heard of that before. If you can get it reproducible, please post it to ni.com so it gets investigated and CAR'd.

Link to comment

QUOTE(Aristos Queue @ Dec 12 2007, 02:26 PM)

A class will stay in memory as long as there are any data instances of the class lingering around on VIs that aren't members of the class. That means hiding in the operate data of controls/indicators (controls of type LabVIEW Object or LVVariant are common hiding places), or even just sitting in terminals.

The inability to close the .ctl window is a new one. I haven't heard of that before. If you can get it reproducible, please post it to ni.com so it gets investigated and CAR'd.

Another "hidden" place is the magic clipboard where LabVIEW items go when they are copied. If you copy a class (I think via CTRL+C), the class is copied to the clipboard and will hang around in memory until the app instance is released (I think).

Link to comment

QUOTE(gmart @ Dec 12 2007, 03:06 PM)

Another "hidden" place is the magic clipboard where LabVIEW items go when they are copied. If you copy a class (I think via CTRL+C), the class is copied to the clipboard and will hang around in memory until the app instance is released (I think).

This is no different than if you copy any subVI -- the clipboard will hold the VI in memory.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.