10-08-2018 09:57 AM - edited 10-08-2018 10:17 AM
Are there any callback functions that can be registered to execute when all VIs in LabVIEW's current application context have finished executing for clean-up/disposal purposes?
I'd like to use a by-ref class using a DVR that is instantiated when one of a handful of its member functions are first executed and that doesn't require explicitly invoking a constructor on the top-level. This single class reference is then used by all class members from that point onwards (providing their input ref is null/unconnected).
I can create this one-time reference using an FGV, similar to the following, but because the class purposely has no central constructor/ownership I need to dispose of this class when the last VI in LabVIEW's application context has finished executing.
Is there a way of doing this, or maybe even a better way of achieving the same functionality?
I'm envisaging only using this configuration when running the code in the IDE - for complete applications, there would be one central constructor and destructor.
FGV example:
10-10-2018 04:59 AM
Aha, I see a similar thing was recently suggested in the Idea Exchange: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Means-to-register-a-DVR-cleanup-callback-fior-use-whe...
With a commonly used work-around using async VIs and queue references: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Means-to-register-a-DVR-cleanup-callback-fior-use-whe...