摘要: ObjectPool.h#include class ObjectPool{private: ObjectPool(unsigned int step, unsigned int size); ~ObjectPool();public: static ObjectPool& get... 阅读全文
posted @ 2015-10-15 21:01 liusijian 阅读(219) 评论(0) 推荐(0) 编辑
摘要: #pragma once#include "KRYObject.h"template class KRYFunction{};templateclass KRYFunction {private: class FunctionBase { public: virtua... 阅读全文
posted @ 2015-10-15 20:57 liusijian 阅读(165) 评论(0) 推荐(0) 编辑
摘要: KRYObject.h#pragma onceclass KRYObject{ template friend class KRYRefPtr; template friend class KRYWeakPtr;private: struct KRYRefCount ... 阅读全文
posted @ 2015-10-15 20:34 liusijian 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #pragma onceclass KRYPtrCount{public: KRYPtrCount() :shared_count(1), weak_count(0){} void addShared(){ shared_count += 1; } void addWeak(){ ... 阅读全文
posted @ 2015-10-15 20:15 liusijian 阅读(170) 评论(0) 推荐(0) 编辑