Click
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
shared< T > Class Template Reference

#include <multithread.hh>

Public Types

typedef ptr write_ptr
 

Public Member Functions

 shared (T p)
 
ptr operator-> ()
 
ptr read ()
 
ptr write ()
 
void get (ptr &o)
 
uint32_t refcnt ()
 
bool unshared ()
 
bool write_held ()
 
bool hasref ()
 
T * unprotected_ptr ()
 

Detailed Description

template<typename T>
class shared< T >

Wrap a pointer to V with a reference count. Call get() and put() to get and put reference. When created, it has a reference count of 1 when the call to put() goes to 0, it calls delete on the pointer.


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