Flyweight pattern

🏷️ Software development

Keep track of created objects

If the object exists, return the object instead of creating a new object

Minimize the amount of consumed memory

https://www.patterns.dev/vanilla/flyweight-pattern