Merge pull request #7732 from Friendseeker/remove-gc-workaround

[1.x] Remove deprecated `System.runFinalization`
This commit is contained in:
eugene yokota 2024-10-06 21:42:55 -04:00 committed by GitHub
commit 09c13af51b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 8 deletions

View File

@ -36,14 +36,6 @@ private[sbt] object GCUtil {
log.debug(s"Forcing garbage collection...")
// Force the detection of finalizers for scala.reflect weakhashsets
System.gc()
// Force finalizers to run.
try {
System.runFinalization()
} catch {
case _: NoSuchMethodError =>
}
// Force actually cleaning the weak hash maps.
System.gc()
} catch {
case NonFatal(_) => // gotta catch em all
}