摘要:
意图:运用共享技术有效地支持大量细粒度的对象。class Flyweight{public: Flyweight() {} virtual ~Flyweight() {} virtual void Operation(int extrinsic_state) = 0;};class ConcreteFlyweight: public Flyweight{public: ConcreteFlyweight(const string& key) { this->key = key; } ~ConcreteFlyweight() ... 阅读全文