The answer really depends on how you're coding this dynamic VI. Setting the FP.Close property to False is essentially the same as clicking the red X close button in the window's title bar. This may not "cleanly" close your VI, especially if you're opening references and the VI doesn't have the chance to close them. Chances are they would be closed automatically, but if, in the more general case, you're doing file I/O, you certainly don't want the VI to abort in the middle of a file write, as that might corrupt the file.
There's a variety of mechanisms that you can use to basically instruct the VI to close. Some possibilities:
- Global variable flag
- Queues
- Setting the value of a front panel control (e.g., programmatically clicking a "Close" button)
An alternative is to not do any of this, and simply have a "close" button on this VI that the user can press to close out the VI.