LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory overload when calling NewCtrl() repeatedly

Originaly, we intended to create dynamically a panel containing between 50 and 2500 controls depending on user defined structures (this panel have scroll bar, since all controls don't fit on the screen). And we observed abnormal memory swap on our test system which already have huge amout of memory (500 MB+) for other reasons.

Every call to NewCtrl() increase memory load of approximatly 100 kBytes.
This value seems a bit too much and we've found that only 10% of this size is really usefull; the other 90% being freed by the next call to DiscardPanel().

You may find a sample application which reproduce this problem; removing the call to DiscardPanel() will overload memory very quick.

This problem was repr
oduced under LabWindows/CVI 5.5 and 6.0.
It doesn't seems to be dependant of the control type.
Calling a message popup fonction will also free memory when the user answer to the popup (thus closing the panel and discarding it).
Discarding a control and/or display the panel doesn't free unused memory.

Operating system if Windows NT 4 + RTX 4.3.1 + CVI 5.5/6.0
Download All
0 Kudos
Message 1 of 1
(2,423 Views)