Feb 12, 2013 at 3:52 PM
Edited Feb 12, 2013 at 4:08 PM
I have a very important question related with releasing memory by D3 ( wpf, not nightly).
I am playing around with ants profiler. Have a memory leaks about 300 kB every hide show of window which is using D3.
to release resources i am using those lines:
also I am removing with:
where 'lm' is a linemarkergraph collected during adding to the graph.
I am also clearing another data I am using, removing adding event handlers etc and finally i reached 300kb which is very hard for me to overcome...
What is interesting - when I use this line below:
Im left with 100 kB of leak every hide and show ! But then nothing is on the display after next show ... this is really D3 specific issue!
Could somebody help me in this matter - will appreciate
Edit: without D3 chartplotter ( all logic the same ) I am gaining 6 kB per hide show !!!
Feb 15, 2013 at 7:51 AM
Edited Feb 15, 2013 at 7:54 AM
If you add some events like "lineGraph.DataChanged", "ViewPortPropertyChaged", "MouseDown/Up" events , you should remove those events also.
Also check the this.dynDisp.Children.Count before and after removing the linegraphs and markers.
If you are adding injected, check those are removed are not.
Remove vertical/Horizontal axes also if added some