Calling Dispose for nodes in the document

Hi, My application is very similar to Demo1 example. Each node in the document represents an instance of various applications. When user clicks a node I call that node's UI with it’s stored configuration through reflection.

Question is: when I close the document, How can I call

dispose on the UI objects for each node which that document. Classes such as
GoDocument, GoSimpleNode … do not implement Dispose() method.
Do I need to do special logic in the Dispose of the GoView?

How dispose of the GoView works (meaning what objects does it free up).

Demo1 seems to leaks memeory. To reproduce this, run Demo1 example, create new document, add several nodes , close the docment without saving. If you repeat this 2-3 times, you can see memory of the demo1 keep incresing everytime.

Actually, all GoDiagram data structures are in managed memory, so calling Dispose is not needed. The garbage collector will free up space when needed. How are you determining how much memory Demo1 is actually using? Looking at its Task Manager memory usage can be very misleading.

Yes, I was using Task manager to view memory and you are correct that it can be very confusing and misleading.

So, If I am using additional resources in my nodes, I need to write
Dispose() method in GraphNode and call this explicitely when dispose is
called on the GoView.

You could implement a Dispose method if you want, but unless you have non-managed resources associated with each node that you need to free, it won’t do any good.