Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9153051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:11:47+00:00 2026-06-17T12:11:47+00:00

From the chapter on FlyWeight Pattern inside Gang of Four the FlyWeight pattern is

  • 0

From the chapter on FlyWeight Pattern inside Gang of Four the FlyWeight pattern is applicable when most object state can be made extrinsic.

What does extrinsic state mean ? I get the feeling that this pattern is used for sharing of objects . If objects are to be shared , then how can that object even have any state at all ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:11:48+00:00Added an answer on June 17, 2026 at 12:11 pm

    Whatever the specific wording in that bulleted list, it is important to understand the message: Flyweight applies to the case where an important part of state can be shared among many objects because it is some data that is the same for all of them. Typically the shared state is immutable by nature (i.e., “universal truth”). The example with font faces makes this quite clear; an example from everyday Java is java.util.regex.Pattern, the flyweight, vs. Matcher, the client object that reuses it and holds local extrinsic state. Many Matchers can exist in parallel, all reusing the compiled regex on the inside.

    This quote makes things clearer than the one from your question:

    The more flyweights are shared, the greater the storage savings. The savings increase with the amount of shared state. The greatest savings occur when the objects use substantial quantities of both intrinsic and extrinsic state, and the extrinsic state can be computed rather than stored. Then you save on storage in two ways: Sharing reduces the cost of intrinsic state, and you trade extrinsic state for computation time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone confirm that these samples from Chapter 3 of Pro Javascript Design Patterns
Can you give chapter and verse from one of the three C standards (preferably
This is a programming exercise from Chapter 6 of The Art and Science of
I'm following a tutorial on how to use Interface Builder from Chapter 2 of
Another chapter from the arguments between myself and the other senior developer series :P
I'm a erlang newbie. When I read the Socket chapter from Programming Erlang and
This question stems from Hartl's Rails Tutorial (progressed in chapter 9) - sorry if
Here is a problem from Programming Pearls 2nd edition (Chapter 8.7): Considering a real
SELECT DISTINCT _id, Game_name, Book, Chapter, Verse_start, Verse_stop, Scripture FROM Bible_Game WHERE God's Kingdom
From this context: import itertools lines = itertools.cycle(open('filename')) I'm wondering how I can implement

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.