LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 7.1.1 Tree Control Memory Problem (Leak?)

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:

  • Delete the tree items, and then close the VI
  • Close the tree reference, and then close the VI (this probably isn't the right thing to do, but I've been trying anything I can to make it work)
  • Explicitly deallocate memory, and then close the VI


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!

0 Kudos
Message 1 of 3
(2,673 Views)

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!

 

 

Richard






0 Kudos
Message 2 of 3
(2,645 Views)

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!

0 Kudos
Message 3 of 3
(2,632 Views)