Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

So here, even if our fleet contained hundreds of planes, we would only have one heavy-weight object of for each type of aircraft.

As a further efficiency measure, we might use lazy creation of the flyweight objects rather than create the initial map up front as in the above example.

...