While using waveform chart, right click it and choose "clear chart", we will find the memory usage growing up about 3M in windows task manager LabVIWE.exe each time. The customer needs to use this function so how can I resolve it ?
Have you reproduced the issue?
1. Write data into Waveform chart continuously
2. Open the windows task manager and note the memory allocated to LabVIEW.
3. Right click on the waveform chart and select "clear chart". Note the approx 3MB increase in memory.
4. Continue selecting "clear chart". Note that the memory increases continuously?
Note: A similar problem with mine
I can resolve this problem by writing data into history data attribute of the waveform chart, however the customer wonders how to keep his using habit without much changing of his code.
attachment is the vi which can reproduce the problem
If I had to guess, I'd say "Clear Chart" doesn't do what we think it should. Sounds more like "Clear Chart Visual and allocate More Memory for new Data." By that definition, I'd say it's not actually destroying previous data. and reallocating memory. So if you think of the problem with that in mind, I bet ya there's a work around.
I ran into this problem today. One workaround, as suggested by Kun02, is to implement your own "Clear Chart" button and when that button changes to True, write an empty array to the chart history via a property node. Then the memory usage drops each time the "Clear Chart" button is pressed.
Doesn't keep the user from right clicking on the chart, selecting Clear Chart from the built in popup menu and using more memory though.
Seems like this should be an easy fix for NI to incorporate into LabVIEW.
I was not around here when this thread was active but I would like to offer another explanation...
The und-do operation requires storing what was displayed in order to perform and "un-do".