Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314979 - should remove listener in StructuredContentAssistProcessor
Summary: should remove listener in StructuredContentAssistProcessor
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: contributed
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-29 09:26 EDT by Michael Spector CLA
Modified: 2010-08-16 22:31 EDT (History)
1 user (show)

See Also:
thatnitind: review+


Attachments
patch (1.88 KB, patch)
2010-05-29 09:26 EDT, Michael Spector CLA
thatnitind: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Spector CLA 2010-05-29 09:26:56 EDT
Created attachment 170456 [details]
patch

The listener is not detached in the release() method. This leak is easily detectable when opening/closing editors in PDT.
Comment 1 Roy Ganor CLA 2010-06-01 05:43:19 EDT
according to the Eclipse conventions described in "A bug's life cycle" document (https://bugs.eclipse.org/bugs/page.cgi?id=fields.html#importance) a memory leak issue should be marked as critical.

thanks,
Comment 2 Nitin Dahyabhai CLA 2010-06-01 10:47:48 EDT
Roy, Michael, is the problem reproducible in editors other than the PHP Editor?
Comment 3 Roy Ganor CLA 2010-06-03 09:46:44 EDT
yes
Comment 4 Nitin Dahyabhai CLA 2010-06-03 17:49:13 EDT
Profiling live objects didn't show a leak, and starting from 53MB of use, opening 19 files took me to 152M (after GC), and closing them all took me back down to 63MB.  Reopening one file shows one live instance each of StructuredContentAssistProcessor and StructuredTextViewer, as expected.

Deferring to 3.2.1 since it's still a good idea.
Comment 5 Nitin Dahyabhai CLA 2010-08-16 22:31:23 EDT
Applied to 3.2.2 and HEAD.
Comment 6 Nitin Dahyabhai CLA 2010-08-16 22:31:39 EDT
Comment on attachment 170456 [details]
patch

Thanks, Michael!