> How do you propose that the individual VIs be statically linked? Will
> passing the refnum from the output of one VI into the input of another
> be suffice? By the way, are there plans to alter the behavior of LV
> with respect to automation refnums in the future so that the
> connection can only be explicitly close? Otherwise, what's the point
> of having the "Close Automation" VI?
Static linkage means that the subVI that opens the refnum is a part of
the hierarchy that uses it. Ideally, the linkage is there because you
call the subVI and return the refnum rather than storing it into a
global. You can also have a subVI call that never gets called because
it is in a case statement in a case that never gets run.
You didn't really m
ention what you are doing here. My guess is that you
are hand-running the open then hand-running the usage VIs. This direct
manipulation mode where all garbage collection is turned off would be
handy, but it would also require some way to do the collection since
many a VI is written such that it doesn't do a Close.
Close works the way you probably expect. It closes the refnum. If the
refnum isn't closed explicitly, then when the VI finishes, the refnum is
closed by LV. True, given enough memory, and assuming the VI will
someday finish, you don't absolutely need to call Close. Problem is, my
computer has a finite amount of memory, and I've heard of LV programs
running for several years. For these reasons, Close is provided, and it
is recommended that you close everything you open.
Greg McKaskle