Bug 398134 - Memory leaks in Juno when opening and closing XML Editor
Summary: Memory leaks in Juno when opening and closing XML Editor
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 3.4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.4.2   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: PMC_approved
Keywords: performance
Depends on:
Blocks:
 
Reported: 2013-01-14 17:03 EST by Nick Sandonato CLA
Modified: 2013-01-28 13:12 EST (History)
2 users (show)

See Also:
nsand.dev: pmc_approved? (david_williams)
nsand.dev: pmc_approved? (raghunathan.srinivasan)
nsand.dev: pmc_approved? (naci.dai)
nsand.dev: pmc_approved? (neil.hauge)
nsand.dev: pmc_approved? (kaloyan)
cbridgha: pmc_approved+
thatnitind: review+


Attachments
patch (19.45 KB, patch)
2013-01-14 17:12 EST, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Sandonato CLA 2013-01-14 17:03:19 EST
+++ This bug was initially created as a clone of Bug #397904 +++

There are many memory leaks when opening/closing the XML editor .

The leaked classes are as follows:

- ContributedContentOutline
The issue is similar to the issue described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=391138.
- editor actions
- contents assists
- a service locator
- menu managers
...
Around 100 classes are leaked.

Attached are two patches that fix all the issues.
Comment 1 Nick Sandonato CLA 2013-01-14 17:11:13 EST
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such.

This is a performance tweak to reduce memory leaks.

* Is there a work-around? If so, why do you believe the work-around is insufficient?

No.

* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?

Ad hoc testing along with running existing unit tests.

* Give a brief technical overview. Who has reviewed this fix?

This patch mostly properly disposes of particular resources that were being held on to. I am the reviewer of the patch originally contributed by Snjezana Peco. I've modified the patch slightly to reduce superfluous nulling of fields.

* What is the risk associated with this fix?

Little. It's just clean up of dangling resources.
Comment 2 Nick Sandonato CLA 2013-01-14 17:12:35 EST
Created attachment 225593 [details]
patch
Comment 3 Chuck Bridgham CLA 2013-01-14 17:42:18 EST
Looks like some good changes here... properly disposing editor artifacts.  Only issue would be closing any artifacts that may be shared between editor instances.

I approve