I check memory leak on the WPF graph.
I see that there is a variable that called: VectorRenderTarger, and it never erased from the memory.
The amount is always changing depending on the number of existing plots on the screen (in the attached project is six plots every time).
When I clear the data & add new data - new (6) VectorRenderTarger variables are added, and the old (6) not erased from the memory.
Is there a way to make this variable to be removed from memory?
Could you indicate in which file you see this variable?
I do not see this variable in visible files, but rather through software that finds memory leaks in the system.
In order to check the leakage actually derives from NI and not from our system I created the project attached, and this variable is added all the time and never deleted.
I attached the picture of the tree that present in the leaks software, so you can see how the variable is held.
(This picture represents a variable that was supposed to be deleted).
Is your project a NI WPF Application? This variable does not come up when you create a regular WPF Application?
According to the tree I've provided before: the problematic variables are in NotifyingCollection<IRenderTarget>.
I saw such list in DataPlotArea class, named RenderTargets.
Could it be that the list is not cleaned properly? or there are objects that register to events in this list that are not unregister when removed?
Which software are you using to find the memory leaks? Also, a work around I could suggest is to try using another Render Mode. If you switch to "Raster" for example, do you still see the same behavior?
When I switch to Raster or HW I do not have this problem. But I want to use Vector, can I work around this problem?
Hello, we also have the same problem with our customers.
For some reasons only Vector mode can be used for our product using NI graph.
And we faced with the same problem.