SeslBitmapHolder

A utility class to hold a Bitmap in a WeakReference.

This class is used to store a Bitmap that might be used across different components or activities, allowing it to be garbage collected if no longer strongly referenced elsewhere.

The Bitmap is stored in a static WeakReference, meaning there's only one instance of the Bitmap held by this class across the application.

This class is not meant to be instantiated. All methods are static.

Functions

Link copied to clipboard
open fun clearBitmap()
Clears the Bitmap stored in the WeakReference.
Link copied to clipboard
@Nullable
open fun getBitmap(): @Nullable Bitmap
Retrieves the Bitmap stored in the WeakReference.
Link copied to clipboard
open fun setBitmapWeakReference(@NonNull bitmap: @NonNull Bitmap)
Sets the Bitmap to be held by this class in a WeakReference.