Quantcast
Channel: JavaPins - Stories tagged with design pattern
Viewing all articles
Browse latest Browse all 25

Design Patterns Uncovered: The Flyweight Pattern

$
0
0
Today’s pattern is the Flyweight pattern, used to share large number of objects in an efficient way.Flyweight in the Real World The classic example of the Flyweight pattern is the representation of a character in a word processor. Rather than each character having seperate glyph objects that represent the font and formatting data, each character could have a reference to a flyweight glyph object shared by every instance of the same cahracter in the document. In this case, the character need only store i...
Pin it

Viewing all articles
Browse latest Browse all 25

Trending Articles