NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing Teststand ActiveX reference in LV shift register

Solved!
Go to solution

jsiegel -

Yes, the context is stored on the panel data so that the panels can have easy access to the context. The lifetime of the panel is equal to the lifetime of the execution, and the context that is being given is the root context, so it will the context is valid until the execution completes.

 

The call to TS_PropertyGetPropertyObject to get ThisContext could have been done with a call to TS_PropertyGetPropertyObject with an empty lookup string, calliing TS_SeqContextAsPropertyObject(),  or even just CA_DuplicateObjHandle(). All of these create a new reference which is later released in DiscardPUUT_PanelData().

Scott Richardson
https://testeract.com
0 Kudos
Message 11 of 13
(1,286 Views)

Scott,

 

Does a copy of a reference get created in LabVIEW when it is coerced to a variant as required for certain functions, such as Enqueue()?

 

 

 

If so, would this problem be remedied by the same fix that addresses the variant-to-reference data copy issue?  Do you know if this issue will be addressed in the next maintenance release of LabVIEW?  Or will you have to kill me if you tell me?

 

 

 

Jeff

 

Message Edited by jsiegel on 01-20-2009 08:15 AM
0 Kudos
Message 12 of 13
(1,266 Views)

Scott--another question:  would LabVIEW's Request Deallocation function release the variant that remains in memory after being converted to a refnum?  Requesting deallocation would be much more desirable than calling the VI dynamically.

0 Kudos
Message 13 of 13
(1,256 Views)