Handle get() { Nullable<boost::shared_ptr<T> > ptr = mObjects->getNonblock(); if (!ptr) ptr = mConstructor(); return Handle( boost::shared_ptr<CallOnDestroy>( new CallOnDestroy( boost::bind( &ObjectPool::checkin, mObjects, *ptr ) ) ), *ptr ); }
void* ReflectType::Create() const { void* obj = (void*)malloc(mSize); mConstructor(obj); return obj; };
//----------------------------------------------------------------------------- // create() //----------------------------------------------------------------------------- LLMotion* LLMotionTableEntry::create(const LLUUID &id) { LLMotion* motionp = mConstructor(id); return motionp; }