Homonym: Flyweight (Boxing)
The Flyweight pattern is a structural design pattern used in software development to minimize memory usage by sharing common data among multiple objects. Instead of creating separate instances for each object, it allows for the creation of a single instance that can be reused, which is particularly useful when dealing with a large number of similar objects.
In this pattern, the shared data is called the "intrinsic state," while the unique data specific to each object is known as the "extrinsic state." By separating these states, the Flyweight pattern optimizes resource management, making it ideal for applications like graphics rendering or text processing, where many similar objects are needed.