diff --git a/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h b/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h index c29eb28..ea89e15 100644 --- a/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h +++ b/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h @@ -34,8 +34,9 @@ template< typename ElementT > FixedSizeList::FixedSizeList(size_t max_size) : max_size(max_size), size(0) { - elementsArray = - new ElementT[max_size]; + elementsArray = static_cast( + embb::base::Allocation::Allocate(sizeof(ElementT) * + max_size)); } template< typename ElementT > @@ -92,7 +93,7 @@ bool FixedSizeList::PushBack(ElementT const el) { template< typename ElementT > FixedSizeList::~FixedSizeList() { - delete[] elementsArray; + embb::base::Allocation::Free(elementsArray); } template< typename GuardType >