|
-
September 22nd, 2005, 06:05 PM
#6
Re: Flyweight pattern
 Originally Posted by Guysl
My question was not about the how to implement the pool (map or other manipulation). I wanted to know whether the main goal of this pattern is the reduction of objects since it seems to me that it saves memory but whenever the extrinsic state is saved elsewhere - then the number
of objects is not reduced.
That is the goal. It can be done depending on how you are able to save the extrinisic state, as bmoodle's example demonstrates. But it's not always possible. If you are unable to reduce the number of objects, then obviously the Flyweight Pattern doesn't help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|