Native Client

pp::NonThreadSafeRefCount Class Reference

A simple reference counter that is not thread-safe. More...

List of all members.

Public Functions

 NonThreadSafeRefCount ()
 ~NonThreadSafeRefCount ()
int32_t AddRef ()
int32_t Release ()

Detailed Description

A simple reference counter that is not thread-safe.

Note: in Debug mode, it checks that it is either called on the main thread, or always called on another thread.


Constructor and Destructor Details

pp::NonThreadSafeRefCount::NonThreadSafeRefCount ( ) [inline]

Default constructor.

In debug mode, this checks that the object is being created on the main thread.

pp::NonThreadSafeRefCount::~NonThreadSafeRefCount ( ) [inline]

Destructor.


Function Details

int32_t pp::NonThreadSafeRefCount::AddRef ( ) [inline]

AddRef() increments the reference counter.

Returns:
An int32_t with the incremented reference counter.
int32_t pp::NonThreadSafeRefCount::Release ( ) [inline]

Release() decrements the reference counter.

Returns:
An int32_t with the decremeneted reference counter.

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

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.