Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » TransactionalEditingDomain.dispose() calls missing?
TransactionalEditingDomain.dispose() calls missing? [message #506834] Sun, 10 January 2010 16:22
András Péteri is currently offline András PéteriFriend
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

Previous Topic:Refresh command on diagram modification
Next Topic:Validation not happening
Goto Forum:
  


Current Time: Sat Apr 27 00:17:44 GMT 2024

Powered by FUDForum. Page generated in 0.03160 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top