Description
There is a leak in memory in the EntityManagerImpl push/popFetchPlan processing where fetch plan associated with the current fetch configuration is add to the _plans IdentityHashMap but never remove from it.
private Map<FetchConfiguration,FetchPlan> _plans = new IdentityHashMap<FetchConfiguration,FetchPlan>(1);
public FetchPlan getFetchPlan() {
assertNotCloseInvoked();
_broker.lock();
try {
FetchConfiguration fc = _broker.getFetchConfiguration();
FetchPlan fp = _plans.get(fc);
if (fp == null)
return fp;
} finally
}
public FetchPlan pushFetchPlan() {
assertNotCloseInvoked();
_broker.lock();
try { _broker.pushFetchConfiguration(); return getFetchPlan(); } finally { _broker.unlock(); }
}
public void popFetchPlan() {
assertNotCloseInvoked();
_broker.lock();
try
finally
{ _broker.unlock(); }}
The only time _plans is cleaned up are during clear() or closed().