Forcing deallocation of large cache object in Java

后端 未结 7 982
醉梦人生
醉梦人生 2021-02-04 09:36

I use a large (millions) entries hashmap to cache values needed by an algorithm, the key is a combination of two objects as a long. Since it grows continuously (because keys in

相关标签:
7条回答
  • 2021-02-04 10:37

    Have you taken a look at WeakHashMap?

    0 讨论(0)
提交回复
热议问题