What is the difference between a soft reference and a weak reference?
January 22, 2025
Soft references are used to refer to objects that should remain in memory until memory is low.
Weak references are cleared as soon as the object is no longer strongly reachable.