Skip to main content

Flyweight

The Flyweight design pattern uses sharing to support large numbers of fine-grained objects efficiently.

Usage     Usage     Low

UML class diagram​

A visualization of the classes and objects participating in this pattern.

diagram

Sample code​

This structural code demonstrates the Flyweight pattern in which a relatively small number of objects is shared many times by different clients.

Output​

See also​

​