Package one.pkg.tinyutils.reference
Class SoftReference<T>
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.SoftReference<T>
one.pkg.tinyutils.reference.SoftReference<T>
- Type Parameters:
T- the type of the referent
- All Implemented Interfaces:
Supplier<T>
The class is necessary to debug memory allocations via soft references. All IDEA classes should use this SoftReference
instead of original from java.lang.ref. Whenever we suspect soft memory allocation overhead this easily becomes a hard
reference so we can see allocations and memory consumption in memory profiler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Tstatic <T> Tdereference(@Nullable Reference<T> ref) Methods inherited from class java.lang.ref.SoftReference
getMethods inherited from class java.lang.ref.Reference
clear, clone, enqueue, isEnqueued, reachabilityFence, refersTo
-
Constructor Details
-
SoftReference
Deprecated.
-
-
Method Details
-
dereference
-
deref
-
SoftReference(Object)