(According to the msdn webcast courses)
Object-oriented solution solves the problem of System Abstraction without compromising the system performance. However, in some special applications, because the number of objects is too large, adopting object-oriented will bring an unbearable internal overhead to the system.
For example, metadata and other objects in graphics applications, character objects in word processing software, etc.
If the solution is purely correct, the problem is that a large number of fine-grained objects will soon flood the system, resulting in a high operating cost. At this time, we should consider using the metadata mode to solve the problem.
Gof: uses the sharing technology to process a large number of fine-grained objects.
Share repeated font objects using the metadata-sharing design idea:
You can also encapsulate a font object as an attribute.
The flyweight mode adopts the shared method to solve the overhead pressure of system resources and performance caused by multiplier objects.
<End>