eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

Memory leak in WorkbenchPage.activationList

Open DanielRaapDev opened this issue 1 year ago • 3 comments

Steps to reproduce

We found a memory leak in WorkbenchPage when using e4 Parts. In the activationList all MPart are added due to E4PartListener.partActivated(). But the removal from that list is done only for CompatibilityPart in firePartClosed(). See https://github.com/eclipse-platform/eclipse.platform.ui/blob/cb121fe0f1b0bb270d8cfbc266092df0fd1de743/bundles/org.eclipse.ui.workbench/Eclipse%20UI/org/eclipse/ui/internal/WorkbenchPage.java#L5080

So after opening and closing a lot of editors more and more objects are kept in memory in this list.

Community

  • [x] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.

DanielRaapDev avatar Feb 26 '24 14:02 DanielRaapDev

Do you want to contribute a fix? If not, please provide some steps how to reproduce or a minimal test.

iloveeclipse avatar Apr 14 '24 16:04 iloveeclipse

Currently I want not to contribute a fix.

DanielRaapDev avatar Apr 15 '24 08:04 DanielRaapDev

Even a simple example that reproduces the problem would help...

merks avatar Apr 15 '24 08:04 merks

i took a headump on an eclipse instance that was used for 6 hours and i could not find significant amount leaked: image closing as not planned

jukzi avatar Jan 09 '25 14:01 jukzi

i could not find significant amount leaked:

Because Eclipse is not using (native) e4 parts. Last time I checked the compatibility layer was used. There (only) the removal is handled correctly.

DanielRaapDev avatar Jan 09 '25 16:01 DanielRaapDev