[#BloombergLP-bdlcc-ObjectPool-2constructor-0b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/ObjectPool.adoc[ObjectPool]::ObjectPool :relfileprefix: ../../../ :mrdocs: Create an object pool that uses the specified `objectCreator` (encapsulating the construction of objects) to create objects. The client must ensure that `objectCreator(buf, alloc)` creates an object at memory location `buf` using `alloc` to supply memory. When the pool is depleted, it will grow capacity according to the optionally specified `growBy` value. If `growBy` is positive, the pool replenishes itself with at least `growBy` new objects. If `growBy` is negative, the amount of increase begins at `‐growBy` and grows geometrically up to an implementation‐defined maximum. When objects are returned to the pool, the default value of RESETTER is invoked with a pointer to the returned object to restore the object to a reusable state. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The behavior is undefined unless `0 != growBy`. == Synopsis Declared in `<bdlcc_objectpool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit ObjectPool( CREATOR const& objectCreator, int growBy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#