LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Close reference after calling VI asynchronously?

In your VI "Call VI asynchronously.vi" you do NOT need to keep the references for the VI's started with the 0x80 flag - you should (instead of squirrelling them away) simply close each immediately after the "start async" call. 

 

Once the 0x80 VI is started as a separate task it is disconnected from the caller. The reference in the caller still has resources attached, but does NOT reference the running (async) VI. The close is just to ensure you don't hang on to resources associated with the reference that you no longer need. In a sense, since the reference is now invalid, the close is merely a 'dispose' - it releases the resources allocated when the reference was created (such as space in the reference table).

 

Saving those references and closing them later simply delays when the resources are recovered by LabVIEW. Since those references are no longer connected to the asynchronously running VIs, closing them has NO EFFECT on the async VIs running in background.

0 Kudos
Message 11 of 11
(405 Views)