Encyclopedia > Flyweight pattern

  Article Content

Flyweight pattern

Flyweight is a software design pattern. When many objects must be manipulated and these cannot afford to have extraneous data, flyweight is appropriate.

In the flyweight pattern, the data has no pointers to the data type methods, because these would consume too much space. Instead, the subroutines are called directly. In some cases, flyweight inheritance is performed by "shift-in" and "shift-out" data markers as a higher-level operation cycles through an array of flyweight data.

One classic example of a flyweight pattern are the characters stored in a word processor.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Holtsville, New York

... 3.47. In the town the population is spread out with 28.2% under the age of 18, 7.5% from 18 to 24, 33.5% from 25 to 44, 23.9% from 45 to 64, and 6.9% who are 65 years of ...

 
 
 
This page was created in 27.9 ms