Template Function librapid::detail::safePointerCopy(T *, size_t, bool)#
Defined in File storage.hpp
Function Documentation#
Safely copy a pointer to a shared pointer. If
ownsData
is true, then the shared pointer will be initialized with a custom deleter that will call safeDeallocate on the pointer. Otherwise, the shared pointer will be initialized with a no-op deleter.- Template Parameters
T – Type of the pointer
- Parameters
ptr – Raw pointer to copy
ownsData – Whether the shared pointer should own the data
- Returns
Shared pointer to the data