mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-27 01:30:35 +08:00
Decrease memory consumption
This commit is contained in:
parent
e8312021f2
commit
35730d665f
@ -738,18 +738,18 @@ public abstract class DependencyAnalyzer implements DependencyInfo {
|
||||
node.method = null;
|
||||
}
|
||||
|
||||
allNodes.clear();
|
||||
classSource.cleanup();
|
||||
agent.cleanup();
|
||||
}
|
||||
|
||||
public void cleanupTypes() {
|
||||
for (DependencyNode node : allNodes) {
|
||||
if (node.typeSet != null) {
|
||||
node.typeSet.cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
allNodes.clear();
|
||||
classSource.cleanup();
|
||||
agent.cleanup();
|
||||
}
|
||||
|
||||
public void cleanupTypes() {
|
||||
for (MethodReference reachableMethod : getReachableMethods()) {
|
||||
MethodDependency dependency = getMethod(reachableMethod);
|
||||
for (int i = dependency.getParameterCount() + 1; i < dependency.getVariableCount(); ++i) {
|
||||
|
@ -66,7 +66,6 @@ class TypeSet {
|
||||
}
|
||||
types.set(type.index);
|
||||
typesCount++;
|
||||
return;
|
||||
}
|
||||
|
||||
DependencyType[] getTypes() {
|
||||
|
@ -388,6 +388,7 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
|
||||
dependencyAnalyzer.getClassSource());
|
||||
cacheStatus.addSynthesizedClasses(dependencyAnalyzer::isSynthesizedClass);
|
||||
dependencyAnalyzer.setInterruptor(null);
|
||||
dependencyAnalyzer.cleanup();
|
||||
|
||||
if (wasCancelled()) {
|
||||
return;
|
||||
@ -463,8 +464,6 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
|
||||
return null;
|
||||
}
|
||||
|
||||
dependencyAnalyzer.cleanup();
|
||||
|
||||
return classSet;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user