December 2018
Intermediate to advanced
512 pages
8h 51m
English
This chapter covers the flyweight pattern.
Use sharing to support large numbers of fine-grained objects efficiently.
A flyweight is a shared object that can be used in multiple contexts simultaneously. The flyweight acts as an independent object in each context—it’s indistinguishable from an instance of the object that’s not shared. Flyweights cannot make assumptions about the context in which ...