So it turns out that I am making a common mistake and that,  had i
done a little more research before posting this question, I would have
found my solution in the huge debate about CLOSING REFERENCES.

Anyway, the short answer to my own question is that I needed to close
all references that were not direct references to front panel objects
(that would be only Cluster A in my terminology). All other references
generated by property nodes (such as Controls[]) should have been
closed when I was done with them.  When I closed them, my VI ran and
quit perfectly and the problem was gone.

  It turns out my suspicions about garbage collection and memory leaks
were pretty much on the money, especially re: using property nodes in
loops.  I'm not going to rehash everything that has already been
discussed, but for people who stumble upon this thread first and want
to know more, here are some general tips and links:

 - close all references when you're done with them

 - it doesn't matter if you close references to front panel controls
-- nothing happens.

 - opening property nodes inside of loops that repeat many times is a
bad idea, unless you close ALL of the generated references in each
loop iteration (including each of the Controls[] elements).  This is
because (in LabView 6), a new reference is generated each time you
call the node.  If you don't close it, LabView will stockpile all the
references in memory and take a long time closing them when you quit
your VI.

 - These problems apply to LabView 6.0 and 6.1.  LabView 7 apparently
does not have this problem because it doesn't generate new references
for each loop -- it gives you the same ones each time.

 - The examples that National Instruments gives you in the tutorials
are MISLEADING!  The examples do not close references.  Yeah, yeah, I
know NI wants you to upgrade to LabView 7, but not everyone wants to
plunk down a few G's for a fix that should be free, so NI should
really emphasize closing references til the cows come home in their
instructional material and help files.

useful links for better explanation:

http://www.ni.com/devzone/lvzone/dr_vi_archived4.htm

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=4&HrefOffset=#HowDoIFormatHTML

thanks to Joe for responding to my question.

 - e

Reply via email to