diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2007-06-26 19:01:12 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2007-06-26 19:01:12 +0000 |
commit | 92fae275e595a2b25c69e43f4a1898fe66a4da68 (patch) | |
tree | 2d50e97b7fe5c8a20285aebb7f1495197a95f4f6 | |
parent | 0bc991544790227ea04309acd3f094ee2dddf48f (diff) | |
download | javassist-92fae275e595a2b25c69e43f4a1898fe66a4da68.tar.gz javassist-92fae275e595a2b25c69e43f4a1898fe66a4da68.zip |
edited for fixing memory leak
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@392 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r-- | src/main/javassist/CtClassType.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/javassist/CtClassType.java b/src/main/javassist/CtClassType.java index 7e965e56..f3106b9e 100644 --- a/src/main/javassist/CtClassType.java +++ b/src/main/javassist/CtClassType.java @@ -240,7 +240,7 @@ class CtClassType extends CtClass { } public synchronized void releaseClassFile() { - if (!isModified()) + if (classfile != null && !isModified() && hasMemberCache() == null) classfile = null; } @@ -256,7 +256,7 @@ class CtClassType extends CtClass { * of the CtClasses that have not been recently used * if they are unmodified. */ - private void releaseClassFiles() { + public void releaseClassFiles() { Enumeration e = classPool.classes.elements(); while (e.hasMoreElements()) { Object obj = e.nextElement(); |