I read here that removing the div should clear all the references of the diagram in the memory. However, it seems this is not the case.
Reproducer - http://jsfiddle.net/wkexydoz/1/
The diagram object still gets logged. I read https://gojs.net/latest/intro/replacingDeleting.html#PermanentlyDeletingDiagram article but I have many possible references in my app and it would not be possible to set all of them to null. Is there a better way to clean the diagram from the memory?