Swift Flyweight Pattern: Save Memory by Sharing Objects
When building an app, you may need to create thousands or tens of thousands of similar objects. A typical example is placing tens of thousands of markers on a map, where the memory graph can easily keep climbing.
Read article