我正在使用scala.collection.concurrent.TriMap
包装在一个对象中来存储远程获取的配置值。
object persistentMemoryMap {
val storage: TrieMap[String, CacheEntry] = TrieMap[String, CacheEntry]()
}
它工作得很好,但我注意到当 Tomcat 关闭时,它会记录一些关于潜在内存泄漏的警告消息
2013-jun-27 08:58:22 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
ALLVARLIG: The web application [] created a ThreadLocal with key of type [scala.concurrent.forkjoin.ThreadLocalRandom$1] (value [scala.concurrent.forkjoin.ThreadLocalRandom$1@5d529976]) and a value of type [scala.concurrent.forkjoin.ThreadLocalRandom] (value [scala.concurrent.forkjoin.ThreadLocalRandom@59d941d7]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak
我猜这个线程最终会自行终止,但我想知道是否有某种方法可以杀死它,或者我应该不理会它吗?