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

Constructors

== Synopses

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

Create an object pool that dispenses shared pointers to `TYPE`&period;


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

[.small]#xref:BloombergLP/bdlcc/SharedObjectPool/2constructor-09.adoc[_» more&period;&period;&period;_]#

Same as the default constructor, using the specified `objectCreator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlcc/SharedObjectPool/2constructor-0c.adoc[SharedObjectPool](
    CREATOR const& objectCreator,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlcc/SharedObjectPool/2constructor-0c.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, using the specified `growBy`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlcc/SharedObjectPool/2constructor-08.adoc[SharedObjectPool](
    CREATOR const& objectCreator,
    int growBy,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlcc/SharedObjectPool/2constructor-08.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, using the specified `objectResetter`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlcc/SharedObjectPool/2constructor-02.adoc[SharedObjectPool](
    CREATOR const& objectCreator,
    RESETTER const& objectResetter,
    int growBy = &hyphen;1,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlcc/SharedObjectPool/2constructor-02.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *growBy*
| replenishment increment or geometric seed (must not be 0)
| *basicAllocator*
| allocator used to supply memory
| *objectCreator*
| creator used to construct pooled objects
| *objectResetter*
| resetter invoked when objects return to the pool
|===


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