V
V
VicTHOR2020-05-17 19:56:34
Design patterns
VicTHOR, 2020-05-17 19:56:34

How to correctly understand the description of the Flyweight pattern?

The object of the ConcreteFlyweight class must be shared

UnsharedConcreteFlyweight (Row, Column) - Unshared Concrete Flyweight
:
- Not all subclasses of Flyweight need to be shared.
The Flyweight interface allows separation but does not enforce it.

I don't really understand what it's about.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Gordinskiy, 2020-05-17
@DmitriyGordinskiy

UnsharedConcreteFlyweight is just an object that holds all the states. It only shows that the implementation of this pattern does not force all objects that implement the Flyweight interface to be shared.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question