NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Do I need to close an opened step reference?

Hello,
I am programmatically renaming a step by getting a reference to the step using method "GetStepByName".  Do I need to then close this reference after I am done renaming the step?  If so, how?  I do not see a corresponding close.  Thanks

David Jenkinson
0 Kudos
Message 1 of 2
(2,919 Views)
This is going to be specific to the environment you are using to get the reference.  If you are doing this in a TestStand sequence, the reference will be automatically closed when you the variable goes out of scope.  If you are using LabVIEW, you will need to use the Close Reference VI.  In CVI, you will need to use the CA_DiscardObjHandle method.  In C++, if you are using the StepPtr class, you do not need to do anything.  In C# or VB.NET, you do not need to do anything since it will be automatically cleaned up by the garbage collector.

Allen P.
NI
Message 2 of 2
(2,911 Views)