CacheAdapter prevents garbage collection [message #626053] |
Wed, 20 February 2008 02:16 |
Rafael Chaves Messages: 362 Registered: July 2009 |
Senior Member |
|
|
Hi all,
In my application, the singleton instance of CacheAdapter keeps holding
onto models even after I unload all resources in a resource set. With
the standard maximum heap size, loading and unloading a model several
times quickly leads to an OutOfMemoryError.
Just for kicks, I imported the org.eclipse.uml2.common plug-in and added
a static flush method to CacheAdapter that just replaces the current
CacheAdapter.INSTANCE with a new, empty one. The problem goes away.
Memory consumption remains constant.
There must be something that my application does that triggers this
problem. I spent some considerably time trying to come up with a simple
test case that would show the problem outside of the scope of my
application, but I haven't managed to do that yet. So instead of opening
a bug report, I decided to ask for help here. So, if CacheAdapter keeps
holding onto model elements, what may I be doing wrong? Any clues?
Thanks,
Rafael
|
|
|
Powered by
FUDForum. Page generated in 0.02154 seconds