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
Petar Minev edited this page Jan 4, 2016
·
2 revisions
Flyweight Dp is used when we have one of the following situations:
Memory constrain;
Generation of many identical objects with little difference;
The Flyweight dp is described with two states:
Intrinsic State - this is the state which is shared with multiple object;
Extrinsic State - this state can varies in different object contexts and cannot be shared
so to be much more clear the differences between those two states let me give you an example:
let's have game in which the hero should collect coins which have different values,so in the table below I've splited the object inthe needed states: