Jump to content

Forgotten DVR (memory leak?)


Recommended Posts

Hi all, I have a question:

If I create an object and then a Data Value Reference to it, then I pass that reference around, but when I'm finished with it, I don't release it, but just forget about it...

Does this cause a memory leak, or is the memory reclaimed?

Br, Mike

Link to comment

Are you referring to a memory leak in Labview or in your application?

I haven't seen anything that indicates Labview has a memory leak when DVR's are not cleaned up properly. When the vi or application stops running the memory will be reclaimed.

As for a leak in your application, my best guess is that it depends on your code. Labview generally retains data in memory as long as the vi that created the data remains active. If you create the DVR in your top level vi LV won't automatically reclaim the memory until that vi goes idle.

Link to comment

Thank you. I'm creating an app that will run for extended periods of time and is using DVRs a lot. It occurred to me that if the app creates a lot of objects and creates DVRs to them without releasing them, it might become a problem. But I wanted to be sure, so thanks for the answer.

In short, if I create DVRs, I better release them once they are not needed any more....

Br, Mike

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.