Lines Matching refs:ref
22 objects. When an existing owner wants to share a reference, it calls ref().
71 void ref() const {
83 // A release here acts in place of all releases we "should" have been doing in ref().
104 * Called when the ref count goes to 0.
137 null in on each side of the assignment, and ensuring that ref() is called
151 if (src) src->ref(); \
164 if (src) src->ref(); \
172 /** Call obj->ref() and return obj. The obj must not be nullptr.
176 obj->ref();
180 /** Check if the argument is non-null, and if so, call obj->ref() and return obj.
184 obj->ref();
216 // - ref() doesn't need any barrier;
220 void ref() const { (void)fRefCnt.fetch_add(+1, std::memory_order_relaxed); }
240 * Shared pointer class to wrap classes that support a ref()/unref() interface.
244 * may have its ref/unref be thread-safe, but that is not assumed/imposed by sk_sp.
256 * Shares the underlying object by calling ref(), so that both the argument and the newly
266 * No call to ref() or unref() will be made.
274 * No call to ref() or unref() will be made.
289 * Shares the underlying object referenced by the argument by calling ref() on it. If this
305 * a reference to another object, unref() will be called on that object. No call to ref()
335 * No call to ref() will be made.
439 * Returns a sk_sp wrapping the provided ptr AND calls ref on it (if not null).