Is there a way in Java to do something before running out of memory. For example, keeping a list of previous document states (for cancellation) and deleting only very old states when the memory is about to be exhausted?
For example, keeping a list of previous document states (for cancellation) and deleting only very old states when the memory is about to be exhausted?
, - SoftReference. java.lang.ref. SoftReference, . , , - , . - .
SoftReference
, .
, , SoftReference . .
.
, : -)
JVM, , JVM . JVM, .