From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Callback function for when all VIs in the current application context finish executing

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:

LabVIEW_2018-10-08_15-51-11.png



Using LV2018 32 bit

Highly recommended open source screen capture software (useful for bug reports).

https://getsharex.com/
0 Kudos
Message 1 of 2
(2,735 Views)

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...

 



Using LV2018 32 bit

Highly recommended open source screen capture software (useful for bug reports).

https://getsharex.com/
0 Kudos
Message 2 of 2
(2,667 Views)