聊聊设计模式(2):享元模式

如何理解享元模式,“享”是共享的意思,“元”指的是元件,也就是小颗粒的东西,享元顾名思义便是共享小部件,很多系统或者程序包含大量对象,但是这些对象绝大多数都是差不多的,除了一些极个别的属性外。

本文同步自 小胡子哥的个人网站,原文地址: http:http://www.barretlee.com/blog/2017/02/04/the-flyweight-pattern-in-design-patterns/

Advertisements
聊聊设计模式(2):享元模式

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s