PCL
pcl::StandardDeleter< T > Class Template Reference

An object deleter that uses the standard delete operator. More...

#include <AutoPointer.h>

Public Types

using pointer = T *
 
using value_type = T
 

Public Member Functions

void operator() (pointer p) const
 

Detailed Description

template<typename T>
class pcl::StandardDeleter< T >

Deleter objects are used by smart pointer classes (e.g., AutoPointer) to destroy and deallocate dynamically allocated objects. A valid deleter class must implement the following member functions:

  • Default constructor.
  • Copy constructor.
  • Move constructor.
  • Function call operator with a single argument of type T* (pointer to T). This member function will destroy and deallocate the T object pointed to by its argument.
  • Function call operator with a single argument of type T[] (array of T). This member function will destroy and deallocate a contiguous sequence of objects stored at the location pointed to by its argument.

StandardDeleter implements object and array destruction/deallocation by calling the standard delete operator.

See also
AutoPointer, AutoPointerCloner

Definition at line 95 of file AutoPointer.h.

Member Typedef Documentation

◆ pointer

template<typename T >
using pcl::StandardDeleter< T >::pointer = T*

Represents a pointer to an object to destroy and deallocate.

Definition at line 107 of file AutoPointer.h.

◆ value_type

template<typename T >
using pcl::StandardDeleter< T >::value_type = T

Represents the type of objects to destroy and deallocate.

Definition at line 102 of file AutoPointer.h.

Member Function Documentation

◆ operator()()

template<typename T >
void pcl::StandardDeleter< T >::operator() ( pointer  p) const
inline

Function call operator. Destroys and deallocates the object pointed to by the specified pointer p.

Definition at line 113 of file AutoPointer.h.


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