[#BloombergLP-bdlcc-ObjectPool-2constructor-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/ObjectPool.adoc[ObjectPool]::ObjectPool
:relfileprefix: ../../../
:mrdocs:

Create an object pool that invokes the default constructor of the the parameterized `TYPE` to construct objects&period; When the pool is depleted, it will increase its capacity according to the optionally specified `growBy` value&period; If `growBy` is positive, the pool replenishes itself with at least `growBy` new objects&period; If `growBy` is negative, the amount of increase begins at `&hyphen;growBy` and grows geometrically up to an implementation&hyphen;defined maximum&period; 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&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `0 !&equals; growBy`&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;objectpool&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
ObjectPool(
    int growBy = &hyphen;1,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
