Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364154 - [Commands] Memory Leak in WorkbenchSourceProvider via context variable "activeEditorInput"
Summary: [Commands] Memory Leak in WorkbenchSourceProvider via context variable "activ...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Windows 7
: P5 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2011-11-18 09:16 EST by Joachim Hoessler CLA
Modified: 2020-04-28 19:12 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Hoessler CLA 2011-11-18 09:16:38 EST
Build Identifier:  M20110909-1335

Upon closing an editor, nearly all variables in the EvaluationContext get cleared, but not "activeEditorInput" - it still holds a reference to the last EditorInput, causing a leak. 

I think this is caused by a missing default entry in the hashmap for "activeEditorInput" in WorkbenchSourceProvider.updateActivaPart(Map currentState, boolean updateShowInSelection). 

Reproducible: Always

Steps to Reproduce:
1. Open one single editor
2. Close the editor
3. "activeEditorInput" variable isn't cleared
Comment 1 Paul Webster CLA 2011-11-18 09:55:40 EST
A leak of what?  IEditorInputs are light-weight objects.

It should still be cleared if activeEditor is clear, I think.

PW
Comment 2 Joachim Hoessler CLA 2011-11-18 10:02:13 EST
(In reply to comment #1)
> A leak of what?  IEditorInputs are light-weight objects.

Well, we're using org.eclipse.compare.CompareEditorInput as Input and that doesn't really look like a light-weight object.

Additionally, I think the variable should get cleared because otherwise an evaluation of the context could yield wrong results.
Comment 3 Eclipse Genie CLA 2020-04-28 19:12:47 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.