You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Applicability:** The Flyweight pattern's effectiveness depends heavily on how and where it's used. Apply the Flyweight pattern when all of the following are true
112
+
* an application uses a large number of objects
113
+
* storage costs are high because of the sheer quantity of objects
114
+
* most object state can be made extrinsic
115
+
* many groups of objects may be replaced by relatively few shared objects once extrinsic state is removed
116
+
* the application doesn't depend on object identity. Since flyweight objects may be shared, identity tests will return true for conceptually distinct objects.
117
+
109
118
##Proxy
110
119
**Intent:** Provide a surrogate or placeholder for another object to control access to it.
0 commit comments