Kotlin, Kotlin Design Patterns, Kotlin Flyweight, Kotlin Flyweight Pattern.
This way, instead of allocating memory each time the object is created, you allocate it once and reuse the previously created object. This means you’ll save some CPU and memory in object creation and make garbage collecting faster. However, there is a tradeoff. Depending on implementation, you will