LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Do I have to close these references?

Solved!
Go to solution

In the attached image, do I need to close static references like this when the VI exits, or does LabVIEW take care of it.? I can't believe I don't know :(.

 

0 Kudos
Message 1 of 7
(2,162 Views)
Solution
Accepted by GregFreeman

You don't need to close them.


___________________
Try to take over the world!
Message 2 of 7
(2,152 Views)

@tst wrote:

You don't need to close them.


 

A parphrase of the Prayer of St Francis

 

"... please help me to open the refs I need to open and close the refs I need to close and the wisdom to know the difference."

 

You can answer for yourself which refs need closed.

 

Type cast the ref to an I32 and create an indicator for it. If the value changes it needs closed.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 7
(2,145 Views)

Thank you for the wisdom, Ben. However, I need to clarify. If it changes....between when and when do I check for the change?

0 Kudos
Message 4 of 7
(2,132 Views)

Each time you run it. If they change for each run then they are being created for each run and need closed. If they are always the same, they are static and do not need closed.*

 

Ben

 

* I have not looked at these recently, You soon get a feel for whcih ones change and do not. If this has changed I DO want to learn about the change.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 7
(2,120 Views)

You do not need to close any reference that you have not explicitly opened with an 'Open' function.

0 Kudos
Message 6 of 7
(2,090 Views)

pcardinale 已写:

You do not need to close any reference that you have not explicitly opened with an 'Open' function.


I also think so!

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview
0 Kudos
Message 7 of 7
(2,047 Views)