![]() | InDesign SDK 20.5 |
#include <K2SmartPtr.h>
Public Types | |
| typedef T | element_type |
| typedef object_type | data_type |
Public Member Functions | |
| shared_array (T *p=0) | |
| shared_array (const shared_array &r) | |
| shared_array & | operator= (const shared_array &r) |
| void | reset (T *p=0) |
| T * | get () const |
| T & | operator[] (std::size_t i) const |
| long | use_count () const |
| bool | unique () const |
| void | swap (shared_array< T > &other) |
| bool | operator! () const |
| operator void * () const | |
Friends | |
| bool | operator== (const Self &lhs, const T *rhs) |
| bool | operator== (const T *lhs, const Self &rhs) |
| bool | operator!= (const Self &lhs, const T *rhs) |
| bool | operator!= (const T *lhs, const Self &rhs) |
shared_array. The array pointed to is deleted when the last shared_array pointing to it is destroyed or reset.
| inline |
Releases the currenly owned resource and aquires the new one.
| p | [IN] - pointer to the new resource. |
| inline |
Exchanges the contents of the two smart pointers.
| other | [IN] - the second smart pointer which will exchange contents with *this. |
| inline |
Checks if there is only one owner of this resource.
| inline |
Retrieves the usage count for this resource.