Does the control reference fed to the Qcontrol ever get closed somewhere? I see where the State data and event handler are closed, but it looks like the reference is left open. Is that correct? If so, is it intentional?
Solved! Go to Solution.
Control references never need to be closed. More generally, nothing that inherits from GObject ever needs to be closed. LabVIEW manages those references internally, and trying to close them is a no-op.
See my Brainless LabVIEW presentation for more info.
Ah TIL! I usually try to rabidly close references because that's the "conventional wisdom"- when you open a reference somewhere, you must close it elsewhere. I'd assumed most of these references worked the same way as, say, a queue reference worked, where each "obtain reference" was unique.
Thanks for that presentation, it's very informative. I need me one of those mousepads
On a similar note, it is best to always use the Close method on every QControl. However, if you forget, I did make it smart enough that the orphaned Event Handler would be stopped automatically as to not hang your application.
Quentin "Q" Alldredge
Q Software Innovations, LLC (QSI)
CLA, LabVIEW Champion
NI Alliance Partner