Flyweight: Share What's the Same

When thousands of objects each carry their own copy of the same few details, memory grows with every object; the Flyweight pattern stores what's the same once per kind and shares it, so each object keeps only what's its own.

By

Updated

Cheat sheet: Flyweight: Share What's the Same
Category
Data Structures
Level
Journeyman
Tags
Extrinsic State, Flyweight Pattern, Immutable Object, Intrinsic State, OOP