LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Do i have to manually close this reference?

Hello,

i have a cluster of references where i use unbundle to get the needed reference and then "Propery: Value" to set the value.

Do i have to close the reference after this action? Does it need memory when not closed?

 

Or is this automatically done?

 

Thanks for help

0 Kudos
Message 1 of 7
(2,493 Views)

Hey

 

Check out this thread here

 

Sletten

0 Kudos
Message 2 of 7
(2,470 Views)

The recommended practice is to close all references in order to avoid memory leaks.

 

Ben explained the following:

"Repeatedly opening and closing ref's will eat up memory because there are resource allocated for each open. The close does not delete these resource (memory) but only marks them as available for deletion. The clean-up only happens when the VI goes idle (ie: stops running gracefully)."

Message 3 of 7
(2,454 Views)

You never need to close control references...they'll be cleaned up by LabVIEW when your VI goes idle.

Message 4 of 7
(2,413 Views)

 


@Darren wrote:

You never need to close control references...they'll be cleaned up by LabVIEW when your VI goes idle.


Would that be acceptable in a CLD exam?  😉

 

0 Kudos
Message 5 of 7
(2,403 Views)

 


@Ray.R wrote:

 

 Would that be acceptable in a CLD exam?  😉


 

If I were grading a CLD, I would not take off for unclosed control references.  Then again, I've never graded a certification exam.  🙂

 

I'll relay my feedback to the certification team that control references need not be closed.

Message 6 of 7
(2,383 Views)

Thanks Darren 🙂

 

0 Kudos
Message 7 of 7
(2,365 Views)