Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » CacheAdapter Memory Leak
CacheAdapter Memory Leak [message #624250] Thu, 02 August 2007 20:53
Steffen Becker is currently offline Steffen BeckerFriend
Messages: 31
Registered: July 2009
Dear UML2 Developers,

in the oAW component in the GMT projects we came across a problem and
currently don't know how to solve it. Maybe you can help...

We are loading an UML2 Profile into different ResourceSets several
times. After accessing the information of the Profile (for code
completion, for example) we abandon the ResourceSet in hope of the
garbage collector collecting it and freeing the memory again. Before we
stop using the Profile, we even unload it from the ResourceSet by
calling profileResource.unload(). However, the memory is not released.
In the memory profiler we see that the class CacheAdapter or
CacheAdapter$InverseCrossReferencer allocate the memory. (See Bug 197079
for the memory profiler's result).

I suspected the CacheAdapter to not unregister itself from the resource
when the resource gets unloads. Hence, I forced the removal of the
adapter by calling resource.eAdapters.clear(). This solved a part of the
problem, one test we have is working now. However, there is still a test
failing with OutOfMemory.

First question is, are we doing something wrong? Is the API expecting a
different call or call order? Is it a bug that the Adapter is not
removed when the resource gets unload?

Second question is: can you think of other locations in the code which
might hold a reference to the CacheAdapter preventing it from being
garbage collected? Any hints on what to search for?

Thanks in advance for any help.

Previous Topic:Draw UML graphically
Next Topic:How to retrieve reference data by giving a class
Goto Forum:

Current Time: Mon Mar 30 14:28:34 GMT 2020

Powered by FUDForum. Page generated in 0.02105 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top