[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-5184) Memory leak in VPE editor

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Sat Nov 14 23:07:42 EST 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-5184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12494596#action_12494596 ] 

Snjezana Peco commented on JBIDE-5184:
--------------------------------------

There are a few issues that cause this memory leak:

1) JSPMultiPageEditorSite
The constructor creates serviceLocator that isn't disposed.

2) The XulRunnerBrowser.dispose() method removes progressListener; it is too late because all SWT objects/controls (webBrowser too) are already disposed when calling the dispose method of an Eclipse editor.

3) MozillaEditor.getEditor() makes the Mozilla window editable using nsIEditingSession.setupEditorOnWindow()
It is necessary to remove objects created by this method using nsIEditingSession.tearDownEditorOnWindow().

4) The biggest issue is that the createPartControl() method in the MozillaEditor and MozillaPreview class creates XulRunnerEditor as an inner class. The XulRunnerEditor class is the gcroot class and retains a reference to MozillaEditor (MozillaPreview) causing MozillaEditor (MozillaPreview) not to be released. They retain references to many WST/EMF classes (about 600-700kb).

I have fixed all these issues in my tree. The fix changes the following plugins:
org.jboss.tools.vpe
org.jboss.tools.vpe.xulrunner
org.jboss.tools.jst.jsp

I have tested  memory leak when opening/closing the VPE editor and changing the Visual/Source page to the Preview page. Haven't tested a possibly memory leak when editing.

This memory leak isn't caused by https://bugs.eclipse.org/bugs/show_bug.cgi?id=207206#c21 

Max,
do you agree that I commit the fix ?

> Memory leak in  VPE editor
> --------------------------
>
>                 Key: JBIDE-5184
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-5184
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Visual Page Editor core
>    Affects Versions: 3.1.0.M4
>            Reporter: Snjezana Peco
>            Assignee: Snjezana Peco
>
> There is a memory leak in the VPE editor. It can be easily reproduced by creating a Seam EAR project and opening/closing home.xhtml. The heap memory is increased about 1MB after every opening/closing this file. 
> This may be caused by the known SWT Mozilla memory leak https://bugs.eclipse.org/bugs/show_bug.cgi?id=207206#c21

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list