Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314979

Summary: should remove listener in StructuredContentAssistProcessor
Product: [WebTools] WTP Source Editing Reporter: Michael Spector <spektom>
Component: wst.sseAssignee: Nitin Dahyabhai <thatnitind>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: ganoro
Version: 3.2Flags: thatnitind: review+
Target Milestone: 3.2.2   
Hardware: PC   
OS: Windows 7   
Whiteboard: contributed
Attachments:
Description Flags
patch thatnitind: iplog+

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!