# Xapian::Internal::RefCntPtr< T > Class Template Reference

A reference-counted pointer. More...

`#include <base.h>`

Inheritance diagram for Xapian::Internal::RefCntPtr< T >:

[legend]
Collaboration diagram for Xapian::Internal::RefCntPtr< T >:

[legend]
List of all members.

## Public Member Functions

T * | operator-> () const
T & | operator * () const
T * | get () const
| RefCntPtr (T *dest_)
| Make a RefCntPtr for an object which may already have reference counted pointers.
| RefCntPtr (const RefCntPtr &other)
void | operator= (const RefCntPtr &other)
void | operator= (T *dest_)
template<class U>
| RefCntPtr (const RefCntPtr< U > &other)

## Detailed Description

### template<class T>
class Xapian::Internal::RefCntPtr< T >

A reference-counted pointer.

Can be used with any class derived from RefCntBase, as long as it is allocated on the heap by new (not new[]!).

## Constructor & Destructor Documentation

template<class T>
Xapian::Internal::RefCntPtr< T >::RefCntPtr | ( | T * | dest_ | ) | `[inline]`

| Make a RefCntPtr for an object which may already have reference counted pointers. You usually pass in a newly created object, or an object may pass in "this" to get a RefCntPtr to itself to pass to other classes. (e.g. a database might pass a newly created postlist a reference counted pointer to itself.)

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

- include/xapian/base.h