03-06-2019 12:32 AM
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.
03-06-2019 04:41 AM - edited 03-06-2019 04:42 AM
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.
03-08-2019 01:43 AM
Thank you very much.
I'll try this solution.