09-18-2014 06:51 AM
Solved! Go to Solution.
09-18-2014 07:59 AM
I'm not sure what language you are developing in or if you are making the API calls from a statement in TestStand.
In TestStand you shouldn't need to release anything except when you call the sequence file method.
In LabVIEW you can use the Close Reference function. Found on the Application Control pallett.
Hope this helps,
09-18-2014 08:02 AM
TestStand uses COM objects and GetStepByName function return a COM object.
"release reference to object when you are done" should be done by using IUnknown::Release function of the COM object.
Sequence file object reference returned by GetSequenceFile is a special case where you need to call both ReleaseSequenceFile and IUnknown::Release function.
However, in many languages, there exists a smart class which acts as a wrapper for the underlying COM object.Ex: CComPtr. These smart classes will do the work of calling Release function and you dont have to expliclity call IUnknown::Release.
Also note that, if you are using GetStepByName, GetSequenceFile or GetSequenceByName in TestStand expression and storing the reference in an instance of Object Reference type variable, you need not call IUnknown::Release function since TestStand automatically calls IUnknown::Release for you.
- Shashidhar
09-18-2014 05:57 PM