From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-27-2011 11:20 AM - edited 09-27-2011 11:21 AM
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 :(.
Solved! Go to Solution.
09-27-2011 11:34 AM
You don't need to close them.
09-27-2011 11:48 AM - edited 09-27-2011 11:48 AM
@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
09-27-2011 12:23 PM
Thank you for the wisdom, Ben. However, I need to clarify. If it changes....between when and when do I check for the change?
09-27-2011 12:53 PM
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.
09-28-2011 09:54 AM
You do not need to close any reference that you have not explicitly opened with an 'Open' function.
09-30-2011 05:45 PM
pcardinale 已写:
You do not need to close any reference that you have not explicitly opened with an 'Open' function.
I also think so!