Template Function librapid::detail::safeDeallocate#
Defined in File storage.hpp
Function Documentation#
-
template<typename A>
void librapid::detail::safeDeallocate(A &alloc, typename std::allocator_traits<A>::pointer ptr, typename std::allocator_traits<A>::size_type size)# Safely deallocate memory for
size
elements, using an std::allocatoralloc
. If the object cannot be trivially destroyed, the destructor will be called on each element of the data, ensuring that it is safe to free the allocated memory.- Template Parameters
A – The allocator type
- Parameters
alloc – The allocator object
ptr – The pointer to free
size – The number of elements of type
in
the memory block