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

Bug 318441

Summary: JdtTypeMirror isn't unloaded after a full build (memory leak)
Product: [Modeling] TMF Reporter: Markus Oley <markus.oley>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: sebastian.zarnekow
Version: unspecifiedFlags: sebastian.zarnekow: helios+
Target Milestone: SR1   
Hardware: All   
OS: All   
Whiteboard:

Description Markus Oley CLA 2010-06-30 07:21:22 EDT
Build Identifier: 20090920-1017

We use JDT-Support for our projects and recognized that after every full build the counts of instances of class JdtTypeMirror is getting twice as high as before the build. 
So I debugged in JdtTypeMirror. With every build a JdtTypeMirror is created, although there has been created one before for this type. 
The method initialize() registers the JdtTypeMirror at JavaCore. 
During the complete build this instances are never unloaded. There is a method private void unloadResource(), but it is never called. I think this is the only code, were JavaCore releases the JdtTypeMirror again. 

This behaviour leeds to a OOM once or twice a day, even although the memory settings are very high (1.5 GB Heap). 

Best regards
Markus

Reproducible: Always

Steps to Reproduce:
1.Create a Java-/Xtext-project with DSLs using Java-Types
2.Full build n-times
Comment 1 Sebastian Zarnekow CLA 2010-07-23 09:01:13 EDT
Fixed in HEAD.
Comment 2 Karsten Thoms CLA 2017-09-19 16:22:55 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.