HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_SharedArray< T > Class Template Reference

A shared ptr for encapsulating dynamically allocated arrays. More...

#include <UT_SharedArray.h>

+ Inheritance diagram for UT_SharedArray< T >:

Public Member Functions

 UT_SharedArray (T *p=0)
 
void clear ()
 Convenience method to clear the pointer. More...
 
void steal (T *src)
 Steal and take ownership of the data passed in. More...
 

Detailed Description

template<class T>
class UT_SharedArray< T >

A shared ptr for encapsulating dynamically allocated arrays.

An shared array takes ownership of the object referenced. The reference counting is done outside the object interface, so the size of a UT_SharedArray is larger than a vanilla pointer.

As this is a wrapper around the boost hboost::shared_array template, the type (T) must have a Copy Constructor and a valid Assignment Operator

See Also
UT_IntrusivePtr

Definition at line 28 of file UT_SharedArray.h.

Constructor & Destructor Documentation

template<class T>
UT_SharedArray< T >::UT_SharedArray ( T p = 0)
inline

Definition at line 31 of file UT_SharedArray.h.

Member Function Documentation

template<class T>
void UT_SharedArray< T >::clear ( void  )
inline

Convenience method to clear the pointer.

Definition at line 34 of file UT_SharedArray.h.

template<class T>
void UT_SharedArray< T >::steal ( T src)
inline

Steal and take ownership of the data passed in.

Definition at line 37 of file UT_SharedArray.h.


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