Kotlin, Kotlin Design Patterns, Kotlin Flyweight, Kotlin Flyweight Pattern.
OutOfMemoryError . The images are already compressed, and they cannot be smaller. You’ve to figure out a way how to save more memory. This is a perfect use case for a Flyweight say there are 3 images, each being 5 MB big, meaning they take 15 MB total, but with Flyweight they’ll only take 5 MB.