Community
Participate
Working Groups
AcceleratorScope class holds KeyBindingService instance as a currentService static variable evenif the service is disposed. And the service holds all registered actions even after it has been disposed. This causes severe memory leak, since one of our own action holds our editor instance, and it remains in memory until the currentService is replaced to another KeyBindingService instance.
This problem could happen any editor which extends AbstructTextEditor class, and may leak large memory if the action holds large objects.
Tetsuro, key binding support is changing in 2.1 and AcceleratorScope class is gone. Regarding 2.0.2: memory leak fixes have been included in yesterdays 2.0.2 build (M20021107). Could you please verify that your problem is fixed with yesterdays build. Text editor and Java editor (both subclasses of AbstractTextEditor) are now removed from memory after being closed and I verified today that all instances of KeybindingService go away. Please reopen if not fixed and if fix is critical for 2.0.2.
KeyBinding service still remains in memory with 1107 2.0.2 build. I think this is a different problem. To reproduce, 1. Open TextEditor 2. Type in a character from keyboard 3. Close editor Then, TextEditor remains in memory since KeyBindingService eventually holds FindReplaceAction, and the action eventually holds the editor. The editor instance will remain in memory until other AbstructTextEditor based class is opened and user type in a character.
I agree. I didn't type a character. It's leaking at most one editor. If this is a must fix for 2.0.2 then please talk to Kevin Haaland. Otherwise we will address this in the 2.1 stream.
I agree that this is not severe enough to get into 2.0.2.
Accelarators are provided by platform UI.
IKeyBindingService now has unregisterAction(IAction) method to remove references. Moving to [Text] for comment.
Is it the editor's responsibility to unregister the actions? As one key binding service is created per editor, the key binding service itself could perform the clean up. Moving to Platform UI for comment.
fixed 2.1 M4 (i think..) this shouldn't be a problem anymore. the KeyBindingService reference for an editor is in the editor's PartSite, which should disappear when the editor is closed.