Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 458404 - Memory leak when closing views
Summary: Memory leak when closing views
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4.1   Edit
Hardware: PC Unix All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-26 08:09 EST by Julien Dehaudt CLA
Modified: 2020-02-21 14:00 EST (History)
3 users (show)

See Also:


Attachments
MAT screenshot on Luna (242.36 KB, image/png)
2015-01-26 08:11 EST, Julien Dehaudt CLA
no flags Details
MAT screenshot on Juno (146.78 KB, image/png)
2015-01-26 08:12 EST, Julien Dehaudt CLA
no flags Details
MAT screenshot on Eclipse 4.5 M5 (219.85 KB, image/png)
2015-02-03 05:27 EST, Julien Dehaudt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Dehaudt CLA 2015-01-26 08:09:05 EST
I'm migrating our plugins suite which made UI contributions (menu/view/toolbar) from Juno to Luna, and I'm facing a possible memory leak when opening/closing the same view several times. Each time the Heap grow about 10Mo. Note that this may be a duplicate of bug 436225.

Using MAT I can observe that the e4 class ToolBarImpl keeps a reference on my view instance, which cannot be garbage collected..
MAT does not report this when playing the same use case on Juno.
Screeshots coming.

I've tried some cleanup in the dispose() method of my view but without success:
getSite().setSelectionProvider(null);
getViewSite().getActionBars().getToolBarManager().removeAll();

What are we suppose to do to solve that case? This is a bit blocking with our Unit suites (got some OutOfMemory exceptions) as views are opened/closed a huge amount of time.
Comment 1 Julien Dehaudt CLA 2015-01-26 08:11:22 EST
Created attachment 250225 [details]
MAT screenshot on Luna

With MAT screenshot on Luna (4.4.1)
Comment 2 Julien Dehaudt CLA 2015-01-26 08:12:04 EST
Created attachment 250226 [details]
MAT screenshot on Juno
Comment 3 Wojciech Sudol CLA 2015-02-02 09:31:19 EST
Could you try Eclipse 4.5 M5? IIRC recently there were some fixes related to memory leaks.
Comment 4 Julien Dehaudt CLA 2015-02-02 09:44:14 EST
Thanks for your answer.
Yes, I'll try it and keep you informed.
Comment 5 Julien Dehaudt CLA 2015-02-03 05:27:58 EST
Created attachment 250460 [details]
MAT screenshot on Eclipse 4.5 M5

Got exactly the same behavior with Eclipse 4.5 M5 downloaded here:
http://download.eclipse.org/eclipse/downloads/drops4/S-4.5M5-201501291830

I just opened/closed 3 times the same view to see increase the heap +30Mo.
Comment 6 Eclipse Genie CLA 2020-02-21 14:00:29 EST
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.