LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I release the memory being used from Subvis once they have run and passed on the required data?

I am trying to run a data file through a number of subvis and I keep filling up the memory - I would like to release the memory from each subsequent subvi as I move along the analysis. How would I do this? I am using LV 6.1.

Thanks!
0 Kudos
Message 1 of 4
(2,920 Views)
Check out the answer on this thread. I think it answers your question.

Tim
Message 2 of 4
(2,918 Views)
Can someone paste a valid link here for the answer above? The old one dosn't work anymore. Thanks,
0 Kudos
Message 3 of 4
(2,670 Views)

You can release memory used by a subVI by calling the Request Deallocation primitive, but that should be used only in extreme cases where you have very large amounts of data which is processed only inside the subVI.

Most of the time, you don't need to do any memory management if you're careful and avoid memory allocation.

Some things to look out for:

  • Resizing arrays or strings inside loops. This is bad because it causes constant memory allocation.
  • Using local or global variables. These cause a copy of the data to be made.
  • Using different data types (e.g. DBL in one place and I32 in another. If the data is coerced, you get a memory allocation.

Do you have a specific problem?

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
Message 4 of 4
(2,667 Views)