Lines Matching refs:ref
34 ResourceReference* ref = mCache->valueAt(i);
35 ALOGD(" ResourceCache: mCache(%zu): resource, ref = 0x%p, 0x%p",
38 i, ref->refCount, ref->destroyed, ref->resourceType);
71 ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : nullptr;
72 if (ref == nullptr || mCache->size() == 0) {
73 ref = new ResourceReference(resourceType);
74 mCache->add(resource, ref);
76 ref->refCount++;
90 ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : nullptr;
91 if (ref == nullptr) {
95 ref->refCount--;
96 if (ref->refCount == 0) {
97 deleteResourceReferenceLocked(resource, ref);
112 ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : nullptr;
113 if (ref == nullptr) {
124 ref->destroyed = true;
125 if (ref->refCount == 0) {
126 deleteResourceReferenceLocked(resource, ref);
134 void ResourceCache::deleteResourceReferenceLocked(const void* resource, ResourceReference* ref) {
135 if (ref->destroyed) {
136 switch (ref->resourceType) {
151 delete ref;