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:
A. Abram White 2007-02-01 16:40:26 +00:00
parent 2ac1bcccbb
commit 11e3835d5f
4 changed files with 4 additions and 4 deletions

View File

@ -1380,6 +1380,7 @@ public class ApplicationIdTool {
} else
log.info(_loc.get("appid-norun"));
}
bc.getProject().clear();
return true;
}

View File

@ -3517,7 +3517,6 @@ public class PCEnhancer {
return meta.getDescribedType();
}
/**
* Move code-related attributes from one method to another.
*/

View File

@ -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.

View File

@ -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);
}