Dynamicaly create and delete the diagram

Hi,

I’m using Go js 1.4.3 with ExtJS 4.2.1, creating the diagram dynamically in the center region of Ext JS and deleting the same region along with the diagram.

My problem is when I delete the diagram the memory occupied by the diagram is not getting cleared. Also if loading the diagram again its occupying the rest of the memory.

How to create and delete a diagram dynamically?
Is there anything I should consider at the time of deletion of the div?

Thanks
Sureshkumar

You’ll need to make sure that you do not have any references to your Diagram or any part of it (i.e. to any Nodes or Links or other GraphObjects) in your JavaScript code/memory.

Are you also removing all references to the DIV HTML element, both from the HTML DOM as well as from all JavaScript memory? If not, you can set Diagram.div = null.

You can also call Diagram.clear() in order to try to remove references within the diagram to each other. However this should not be necessary if you have already done the previously mentioned things.