class weakref_type

Defined at line 294 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

Public Methods

RefBase * refBase ()
void incWeak (const void * id)
void incWeakRequireWeak (const void * id)
void decWeak (const void * id)
bool attemptIncStrong (const void * id)

acquires a strong reference if there is already one.

bool attemptIncWeak (const void * id)

acquires a weak reference if there is already one.

This is not always safe. see ProcessState.cpp and BpBinder.cpp

for proper use.

int32_t getWeakCount ()

DEBUGGING ONLY: Get current weak ref count.

void printRefs ()

DEBUGGING ONLY: Print references held on object.

void trackMe (bool enable, bool retain)

DEBUGGING ONLY: Enable tracking for this object.

enable -- enable/disable tracking

retain -- when tracking is enable, if true, then we save a stack trace

for each reference and dereference; when retain == false, we

match up references and dereferences and keep only the

outstanding ones.