Lines Matching refs:this
4 * Use of this source code is governed by a BSD-style license that can be
40 SkASSERTF(this->getRefCnt() == 1, "fRefCnt was %d", this->getRefCnt());
62 SkASSERT(this->getRefCnt() > 0);
68 decrement, then delete the object. Note that if this is the case, then
72 SkASSERT(this->getRefCnt() > 0);
77 this->internal_dispose();
95 SkASSERT(0 == this->getRefCnt());
98 delete this;
119 // "#include SK_REF_CNT_MIXIN_INCLUDE" doesn't work with this build system.
122 void deref() const { this->unref(); }
157 // There's only benefit to using this if the deriving class does not otherwise need a vtable.
180 delete (const Derived*)this;
183 void deref() const { this->unref(); }
185 // This must be used with caution. It is only valid to call this when 'threadIsolatedTestCnt'
188 // call. Assuming the contract is followed, if this returns false then no other thread has
189 // ownership of this. If it returns true then another thread *may* have ownership.
192 // If this fails then the above contract has been violated.
255 sk_sp<T>& operator=(std::nullptr_t) { this->reset(); return *this; }
258 * Shares the underlying object referenced by the argument by calling ref() on it. If this
263 if (this != &that) {
264 this->reset(SkSafeRef(that.get()));
266 return *this;
271 this->reset(SkSafeRef(that.get()));
272 return *this;
281 this->reset(that.release());
282 return *this;
287 this->reset(that.release());
288 return *this;
292 SkASSERT(this->get() != nullptr);
293 return *this->get();
296 explicit operator bool() const { return this->get() != nullptr; }
306 // Calling fPtr->unref() may call this->~() or this->reset(T*).