04 Dec 2023
Flyweight lets you for more objects into the available amount of RAM by sharing common parts between multiple objects.
For example, in text editors, each character in a document can be represented as a flyweight object. The character's intrinsic state (such as its Unicode code point) is shared among all instances, while the extrinsic state (e.g., position and formatting) is stored separately for each character.