BloombergLP::bdlcc::SharedObjectPool::SharedObjectPool

Constructors

Synopses

Declared in <bdlcc_sharedobjectpool.h>

Create an object pool that dispenses shared pointers to TYPE.

explicit
SharedObjectPool(
    int growBy = -1,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the default constructor, using the specified objectCreator.

explicit
SharedObjectPool(
    CREATOR const& objectCreator,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the preceding overload, using the specified growBy.

SharedObjectPool(
    CREATOR const& objectCreator,
    int growBy,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the preceding overload, using the specified objectResetter.

SharedObjectPool(
    CREATOR const& objectCreator,
    RESETTER const& objectResetter,
    int growBy = -1,
    bslma::Allocator* basicAllocator = 0);
» more...

Parameters

NameDescription
growByreplenishment increment or geometric seed (must not be 0)
basicAllocatorallocator used to supply memory
objectCreatorcreator used to construct pooled objects
objectResetterresetter invoked when objects return to the pool