NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UI MESSAGE ThisContext reference and release

I'm using TS API PostUIMessageEx to transmit data from LV to TS, "ThisContext" was used for activeXDataParam value. I use "Teststand - Set Property Value.vi" and close reference "Sequence Context Out" after set property value in LV. When I exit from UI programe, it shows that "References to PropertyObjects were not released properly....”

I can confirm that there were no error if I skipped PostUIMessageEx in TS. Does ThisContext should be released in TS after PostUIMessageEx step? But I didn't find the way to release it, I wender how to solve this problem?

Thanks a lot.

0 Kudos
Message 1 of 3
(1,998 Views)

I'm used to follow this rule of thumb for all ActiveX or .NET interfaces with external code:

Close all references you create/derive in your code. Never close references you get as parameter explicitly.

 

I very rarely have issues with incorrectly closed references, so i think it is suitable as recommendation.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(1,982 Views)

Thank you very much.

I'll try this solution.

0 Kudos
Message 3 of 3
(1,963 Views)