Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph Annotations

Hi,

 

I want to add annotations to my points on chart, depens on user selection if he wants to add or not.

The problem is that the point annotations are remains on memory even I already removed them.

what can I do to solve this memory leak?

 

attached sample project, with buttons to add and remove, and you can see that all points are remains in memory.

 

Thanks!

0 Kudos
Message 1 of 2
(1,849 Views)

Unfortunately, I could not reproduce the memory leak when I tried to run your application with Measurement Studio 2019. After an initial increase, memory use eventually stabilized when repeatedly adding and removing the point annotations. Comparing memory snapshots before and after also showed all of the point annotations were garbage collected.

 

That said, the graph was designed to handle a large amount of data, not a large number of annotations. If you only need to display annotations (without interaction), then a single custom IRenderable that can draw multiple annotations at once would be more efficient, like the class used in this question.

~ Paul H
0 Kudos
Message 2 of 2
(1,767 Views)