diff --git a/src/groups/mqb/mqbblp/mqbblp_pushstream.cpp b/src/groups/mqb/mqbblp/mqbblp_pushstream.cpp index bf63aabc8..37265b7ba 100644 --- a/src/groups/mqb/mqbblp/mqbblp_pushstream.cpp +++ b/src/groups/mqb/mqbblp/mqbblp_pushstream.cpp @@ -40,12 +40,16 @@ PushStream::PushStream( bslma::Allocator* allocator) : d_stream(allocator) , d_apps(allocator) -, d_pushElementsPool_sp(pushElementsPool.value_or(bsl::nullptr_t()), - noOpDeleter, - allocator) +, d_pushElementsPool_sp() { allocator = bslma::Default::allocator(allocator); + if (pushElementsPool.has_value()) { + d_pushElementsPool_sp.reset(pushElementsPool.value(), + noOpDeleter, + allocator); + } + if (!d_pushElementsPool_sp) { d_pushElementsPool_sp.load( new (*allocator) bdlma::ConcurrentPool(sizeof(Element), allocator),