Skip to content

Commit 7ed7aef

Browse files
committed
Remove aggressive manual garbage collection
1 parent 0e68cdf commit 7ed7aef

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

java/src/processing/mode/java/pdex/ErrorCheckerService.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,7 @@ public void run() {
277277
astGenerator.disposeAllWindows();
278278
}
279279
classLoader = null;
280-
System.gc();
281280
Messages.loge("Thread stopped: " + editor.getSketch().getName());
282-
System.gc();
283281

284282
running = false;
285283
}
@@ -441,9 +439,6 @@ protected CodeCheckResult checkCode() {
441439
if (loadCompClass) {
442440
classPath = new URL[classpathJars.size()];
443441
classPath = classpathJars.toArray(classPath);
444-
445-
classLoader = null;
446-
System.gc();
447442
classLoader = new URLClassLoader(classPath);
448443
loadCompClass = false;
449444
}
@@ -613,16 +608,7 @@ public CompilationUnit getLatestCU() {
613608
}
614609

615610

616-
private int loadClassCounter = 0;
617-
618611
public URLClassLoader getSketchClassLoader() {
619-
loadClassCounter++;
620-
if (loadClassCounter > 100) {
621-
loadClassCounter = 0;
622-
classLoader = null;
623-
System.gc();
624-
classLoader = new URLClassLoader(classPath);
625-
}
626612
return classLoader;
627613
}
628614

0 commit comments

Comments
 (0)