When to use Flyweight pattern?
Answered
When to use Flyweight pattern?
Best answer
Flyweight pattern should be used when:
- There is a need to create large number of similar objects
- Many similar objects are used and the storage cost is high
- Most of the object attributes can be made external and shared
- The identity of each object does not matter
- A few shared objects would easily replace many unshared objects