(LabVIEW 7, Windows XP Prof.)
In an application under development I generate graph displays during run-time by cloning a graph.vi. One problem I have run into though is that whenever a clone has been created the application allocates additional memory and not all of this extra memory is deallocated when the clone is destroyed. So - everytime a clone has been created the memory footprint
growns...and destroying the clones does not reduce it back to the original size....there is a memory leak that eventually will cause a problem.
To illustrate the problem I have made a simple clonemaker application and a clone. Launch the clonemaker and start monitoring it's memory use (using e.g. task manager). Now create a clone by pressing the cr
eate clone button. The memory increases, so far everything as expected. Now close the clone...you would now expect the memory to drop back to what it was before the clone was created, but no..it has increased slightly.
Now try creating e.g. 100 clones and then
close them all again. On my computer the memory footprint has now increased by 2MB, even though
all the clones have/should have been released from memory!
The clones allocate a block of memory by initializing an array just to better visualize that
that memory is in fact released when the clone is destroyed...but for some reason not all memory. As far as I can see this should not be a VI reference related leakage, I think all references are disposed of correctly.
Can anyone explain this / modify the main or clone so that the memory leak disappears?