+1 vote
in JAVA by
A difference between WeakReference and SoftReference in Java?

1 Answer

0 votes
by

Though both WeakReference and SoftReference helps garbage collector and memory efficient, WeakReference becomes eligible for garbage collection as soon as last strong reference is lost but SoftReference even thought it can not prevent GC, it can delay it until JVM absolutely need memory.

Related questions

0 votes
asked Jun 17, 2019 in JAVA by reins.robin
0 votes
asked Oct 13, 2020 in JAVA by SakshiSharma
...