mirror of https://github.com/apache/openjpa.git
Clear bytecode Project of ProxyManagerImpl to save memory.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@502277 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2ac1bcccbb
commit
11e3835d5f
|
@ -1380,6 +1380,7 @@ public class ApplicationIdTool {
|
|||
} else
|
||||
log.info(_loc.get("appid-norun"));
|
||||
}
|
||||
bc.getProject().clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -3517,7 +3517,6 @@ public class PCEnhancer {
|
|||
return meta.getDescribedType();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Move code-related attributes from one method to another.
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,6 @@ import java.util.HashSet;
|
|||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.openjpa.enhance.PCEnhancer;
|
||||
import org.apache.openjpa.util.InternalException;
|
||||
|
@ -35,7 +34,6 @@ import serp.bytecode.Code;
|
|||
import serp.bytecode.Constants;
|
||||
import serp.bytecode.Project;
|
||||
|
||||
|
||||
/**
|
||||
* Creates implementations of managed interfaces. Will throw exceptions
|
||||
* on unknown properties.
|
||||
|
|
|
@ -473,7 +473,9 @@ public class ProxyManagerImpl
|
|||
private Class loadProxy(BCClass bc, ClassLoader loader) {
|
||||
BCClassLoader bcloader = new BCClassLoader(bc.getProject(), loader);
|
||||
try {
|
||||
return Class.forName(bc.getName(), true, bcloader);
|
||||
Class c = Class.forName(bc.getName(), true, bcloader);
|
||||
bc.getProject().clear();
|
||||
return c;
|
||||
} catch (Throwable t) {
|
||||
throw new GeneralException(bc.getName()).setCause(t);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue