Community
Participate
Working Groups
Consider the example below. modeltype ECORE "strict" uses ecore('http://www.eclipse.org/emf/2002/Ecore'); transformation NewTransformation(in eModel : ECORE, out outModel : ECORE); intermediate property EPackage::y : String; main() { while (i : Integer := 0; i < 1000000) { var pack := object EPackage { y := 'aaa'; }; outModel.removeElement(pack); } } Currently, it causes a memory leak. While this is arguable, such pattern might be preferred for creation of multiple temporary data in computational transformations. This is because intermediate class instances are stored in the intermediate extent and thus, are not collected by the GC until the transformation has finished which might cause out-of-memory errors. To resolve this bug, I would make the IntermediatePropertyModelAdapter.ShadowEntry.myOwner2ShadowMap field a weak identity hash map. See also bug 279251.