Dragging Tool Cause Memory Leak

During testing memory leaks in our application we notice that the Dragging tool is holding classes in memory with the

static List DraggedOverTools

I saw that CleanUpDraggingTool function that clear the static list can be called if i will call the ToolManager.DoMouseMove

can i call the ToolManager.DoMouseMove myself or calling this function can cause problems/exceptions?

is there any other why to clean the DraggedOverTools list?

the DraggedOverTools holding our classes even after we closed every window that contain the Goxam.

the memory leak can be shown in the picture below:

Is this for Silverlight or for WPF? Which four-part version of our DLL are you using?


DLL version

I think you can call ToolManager.DoMouseMove() safely, particularly if you do something like:

new ToolManager().DoMouseMove();

I don’t understand why you are getting a memory problem, though, because DraggingTool.DoDragOut always calls CleanUpDraggingTool when a drag-and-drop is started within the diagram. Does the problem only happen when there’s an external drag that entered the diagram?

I don’t know when the problem happens or why i just know that someone in my company told me that there is a leak and he send me the picture , i didn’t investigate enough to see what contidions casues it.

i am using my own dragging tool that inerites from DraggingTool and i even tried to check the function you talk about by using
protected override void DoDragOut()
            Console.WriteLine("DoDragOut " + DateTime.Now );
but the function wasn't call even once.
if i have two open windows with goxam digram and i will call the new ToolManager().DoMouseMove(); that will clear the static list
when closing one of the window could it cause problem with the second window that contain the goxam?

That should be fine – as I said, the list is cleared after each drag-and-drop started in the diagram, and drag-and-drop is inherently modal.