no_deleter< T > Class Template Reference

Used as a std::shared_ptr deleter (second argument) to overload delete ptr with nothing (no dereferencing). More...

#include <kernel-dispatch.h>

Public Member Functions

void operator() (T const *ptr)
 Called by std::shared_ptr when its reference count reaches zero. More...
 

Detailed Description

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

Used as a std::shared_ptr deleter (second argument) to overload delete ptr with nothing (no dereferencing).

This could be used to pass borrowed references with the same C++ type as owned references.

See also

  • array_deleter, which frees array buffers, rather than objects.
  • cuda_array_deleter, which frees array buffers on GPUs.
  • 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: