Tag Archives: flyweight-pattern

Design Patterns: Flyweight

The Flyweight Design Pattern allows you to share instances of the same object across multiple calls.

In the example on this post I’m reusing a rectangle with the same color, that makes the color property “intrinsic”. But I’m not sharing position and size across the instances, so those characteristics are “extrinsic”.
Continue reading