Awkward Array: array_deleter< T > Class Template Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
array_deleter< T > Class Template Reference

Used as a `std::shared_ptr` deleter (second argument) to overload `delete ptr` with `delete[] ptr`. More...

`#include <kernel-dispatch.h>`

## Public Member Functions
void | operator() (T const *ptr)
| Called by `std::shared_ptr` when its reference count reaches zero.

## Detailed Description

template<typename T>
class awkward::kernel::array_deleter< T >

Used as a `std::shared_ptr` deleter (second argument) to overload `delete ptr` with `delete[] ptr`.

This is necessary for `std::shared_ptr` to contain array buffers.

See also

- cuda_array_deleter, which deletes an array on a GPU.
- no_deleter, which does not free memory at all (for borrowed references).
- pyobject_deleter, which reduces the reference count of a Python object when there are no more C++ shared pointers referencing it.

## Member Function Documentation

## ◆ operator()()

void operator() | ( | T const * | ptr | ) |
| inline

Called by `std::shared_ptr` when its reference count reaches zero.

The documentation for this class was generated from the following file:

- include/awkward/kernel-dispatch.h