LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree control memory issue

I have a routine that would populate a big tree control.  It takes a while, and that's fine.  However, if I do it a couple of time, my computer crash.  Should I somehow free up the memory after each load?  

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 3
(2,364 Views)

Hi Jiyang,

 

If the successive trees do have different sizes (notably increasing sizes), LabVIEW may try to allocate a new memory block to contain all the tree information. Arises a crash if LabVIEW does not have enough available memory.

Also, are you using references on your tree(s) ? If they're not closed, LabVIEW can consider the whole memory used for the tree to be an "active" memory, thus disabling LabVIEW from reusing previously allocated memory.

 

More to read here

 

Regards,

Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

Message 2 of 3
(2,359 Views)

If the successive trees have different size, what should I do?  I don't want it to allocate a new memory block for each one.

 

If I am using reference on my tree, but I am always using the same reference for successive tree.  Would the same memory be used?  

 

When i said crash, I meant the tree will continue to load indefinitely.  

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 3
(2,356 Views)