TransactionalEditingDomain.dispose() calls missing? [message #506834] |
Sun, 10 January 2010 16:22 |
András Péteri Messages: 22 Registered: January 2010 |
Junior Member |
|
|
Hi everyone,
I've found some parts in GMF's generated code where the factory-created transactional editing domain is not disposed of properly. If the factory is a descendant of WorkspaceEditingDomainFactory, the editing domain's associated command stack (or rather its non-static inner class, DomainListener) is set as a listener on Eclipse's operation history, but because of the missing dispose(), it is never removed; I believe this means that the editing domain and its resource set remains outside the reach of the garbage collector throughout the application's lifetime, causing increasing memory usage in our application. In the context of GMF's mind map example, this happens in:
- MindmapInitDiagramFileAction, where the instantiated editing domain is passed to the new diagram wizard, and never used after diagram generation is complete
- DiagramEditor's doSetInput() method, where an editing domain is created, passed to MindmapDocumentProvider's createInputWithEditingDomain() method, which passes the received IEditorInput object back unchanged without using the supplied editing domain instance
- MindmapDocumentProvider, which creates a separate editing domain from the above for its IDocument in the createEmptyDocument() method.
Is there any reason for these instances not having a corresponding disposal call?
Edit: changed title
[Updated on: Thu, 14 January 2010 13:01] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03160 seconds