Lines Matching refs:impl

399     weakref_impl* const impl = static_cast<weakref_impl*>(this);
400 impl->addWeakRef(id);
401 const int32_t c = android_atomic_inc(&impl->mWeak);
408 weakref_impl* const impl = static_cast<weakref_impl*>(this);
409 impl->removeWeakRef(id);
410 const int32_t c = android_atomic_dec(&impl->mWeak);
414 if ((impl->mFlags&OBJECT_LIFETIME_WEAK) == OBJECT_LIFETIME_STRONG) {
419 if (impl->mStrong == INITIAL_STRONG_VALUE) {
422 delete impl->mBase;
424 // ALOGV("Freeing refs %p of old RefBase %p\n", this, impl->mBase);
425 delete impl;
429 impl->mBase->onLastWeakRef(id);
430 if ((impl->mFlags&OBJECT_LIFETIME_MASK) == OBJECT_LIFETIME_WEAK) {
433 delete impl->mBase;
442 weakref_impl* const impl = static_cast<weakref_impl*>(this);
444 int32_t curCount = impl->mStrong;
448 if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mStrong) == 0) {
451 curCount = impl->mStrong;
461 allow = (impl->mFlags&OBJECT_LIFETIME_WEAK) != OBJECT_LIFETIME_WEAK
462 || impl->mBase->onIncStrongAttempted(FIRST_INC_STRONG, id);
468 allow = (impl->mFlags&OBJECT_LIFETIME_WEAK) == OBJECT_LIFETIME_WEAK
469 && impl->mBase->onIncStrongAttempted(FIRST_INC_STRONG, id);
475 curCount = android_atomic_inc(&impl->mStrong);
483 impl->mBase->onLastStrongRef(id);
487 impl->addStrongRef(id);
494 android_atomic_add(-INITIAL_STRONG_VALUE, &impl->mStrong);
495 impl->mBase->onFirstRef();
503 weakref_impl* const impl = static_cast<weakref_impl*>(this);
505 int32_t curCount = impl->mWeak;
509 if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mWeak) == 0) {
512 curCount = impl->mWeak;
516 impl->addWeakRef(id);