DGtal 1.3.0
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
DGtal::Clone< T >::TempPtr Struct Reference

Internal class that is used for a late deletion of an acquired pointer. More...

#include <DGtal/base/Clone.h>

Public Member Functions

 TempPtr (T *ptr)
 
 ~TempPtr ()
 

Data Fields

T * _ptr
 Acquired pointer. More...
 

Detailed Description

template<typename T>
struct DGtal::Clone< T >::TempPtr

Internal class that is used for a late deletion of an acquired pointer.

Definition at line 300 of file Clone.h.

Constructor & Destructor Documentation

◆ TempPtr()

template<typename T >
DGtal::Clone< T >::TempPtr::TempPtr ( T *  ptr)
inline

Constructor from pointer.

Parameters
ptrAny pointer that is acquired by 'this'.

Definition at line 305 of file Clone.h.

305: _ptr( ptr ) {}
T * _ptr
Acquired pointer.
Definition: Clone.h:311

◆ ~TempPtr()

template<typename T >
DGtal::Clone< T >::TempPtr::~TempPtr ( )
inline

Destructor. Performs delete on _ptr member.

Definition at line 309 of file Clone.h.

309{ ASSERT( _ptr != 0 ); delete _ptr; }

References DGtal::Clone< T >::TempPtr::_ptr.

Field Documentation

◆ _ptr

template<typename T >
T* DGtal::Clone< T >::TempPtr::_ptr

Acquired pointer.

Definition at line 311 of file Clone.h.

Referenced by DGtal::Clone< T >::TempPtr::~TempPtr().


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