自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

sala223的专栏

bear fairyland

  • 博客(4)
  • 资源 (3)
  • 收藏
  • 关注

原创 对象引用计数

  引用计数是为了节省空间的目的,在一个类A中,我们可以包含一个类B对象的指针,从而如果类A的不同实例都有同一的类B对象,那么这些实例中的B对象指针就可以指向同一个B对象.  下面是对象引用计数的一个粗略的实现,同时如果要达到引用计数的目的,必须有些限制条件.第1:类A必须有reference_count类的一个对象第2:要为char*的类型提供特化版本第3:要取得引用的对象,我们必须提供自己

2006-03-20 21:15:00 1141

原创 类实例个数的限制

#include #ifndef COUNT_HPP#define COUNT_HPP 1/*任何想用来限制自身对象数量的类可以继承此类 beCounted为该类名 size为计数尺寸  任何继承该类的实现中必须给最大计数初始化 例: template size base_count::maxObject=10; 注: 这个实现并不能解决多重继承计数的问题*/template class

2006-03-18 13:59:00 999

原创 简单的内存池模型

一个简单的针对原数据类型的内存池模型,纯粹为了练习下c++,没做特别的考虑.#include #include #include #ifndef  POOL#define  POOL  1//针对每一种原数据类型类型(或者是有trival构造函数的自定义类型),存在一个pooltemplate class pool{private: union  node {    Elem  e; 

2006-03-08 18:12:00 905

转载 C++中使用union的几点思考

这段时间整理旧资料,看到一些文章,虽然讲的都是些小问题,不大可能用到,但也算是一个知识点,特整理出来与大家共享。与此相关的那篇文章的作者的有些理解是错误的,我写此文,也是纠正为了作者的一些错误认识。当然,如果我的理解有任何错误,也恳请大家批评指正。  C++虽说被B.S.称作一门新语言,但它毕竟与C有着千丝万缕的联系,虽然B.S.一再坚持,但我还是愿意把C++看作是C ++。  我们应该按照C中的

2006-03-08 17:40:00 1052

java concurrency in practice.chm

I was fortunate indeed to have worked with a fantastic team on the design and implementation of the concurrency features added to the Java platform in Java 5.0 and Java 6. Now this same team provides the best explanation yet of these new features, and of concurrency in general. Concurrency is no longer a subject for advanced users only. Every Java developer should read this book." --Martin Buchholz JDK Concurrency Czar, Sun Microsystems

2009-01-10

Domain-Driven Design: Tackling Complexity in the Heart of Software

The software development community widely acknowledges that domain modeling is central to software design. Through domain modeling, software developers are able to express rich functionality and translate that functionality into software implementation that truly serves the needs of its users. Despite its obvious importance, however, there are few practical resources that show how to incorporate effective domain modeling into the software development process.

2008-11-13

C99 standard

C 99 标准. With the introduction of new devices and extended character sets, new features may be added to this International Standard. Subclauses in the language and library clauses warn implementors and programmers of usages which, though valid in themselves, may conflict with future additions

2008-10-11

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除