03-18-2009 03:32 AM
Hello,
I've been using the LabVIEW native tree control to implement an algorithm that uses a tree structure to store data. It works fine, except that I have a lot of data and the tree does not seem to be releasing memory after it is used. I tried everything I could to get the memory released / deallocated but have not found a way. If someone could show me something I'm missing, that would be great. If not, if someone could confirm that they too get the memory leak behavior that I am getting, it would be appreciated.
I am attaching a VI that simply blasts large strings into a tree control so that you can easily see the memory usage going up. The following things have not worked for me to deallocate memory:
The explicit memory deallocation idea came from this thread on a very similar subject, but doesn't work for me.
So either confirmation of the problem or even better, someone telling me how to do things better would be greatly appreciated!
03-18-2009 07:30 AM
That was horrifying.
The loop iteslf is wrecking the memory. By the time you stop the loop, it's too late, the damage is done. I have 4GB and had to reboot.
First off, put a (huge) delay in the loop!
03-18-2009 03:41 PM
That itself is interesting. Maybe the implementation of the tree has changed since 7.1.1 because that loop runs quite slowly on my system (not a slow system) and increases memory usage by about 1MB every second or two.
Sorry about that. I'm attaching another with a delay in it. And thank you for trying it out.
Anybody reading this, put a delay in the loop or use this new attachment!