Lines Matching refs:SkAutoTUnref
182 template <typename T> class SkAutoTUnref : SkNoncopyable {
184 explicit SkAutoTUnref(T* obj = NULL) : fObj(obj) {}
185 ~SkAutoTUnref() { SkSafeUnref(fObj); }
195 void swap(SkAutoTUnref* other) {
229 * SkAutoTUnref assumes ownership of the ref. As a result, it is an error
230 * for the user to ref or unref through SkAutoTUnref. Therefore
231 * SkAutoTUnref::operator-> returns BlockRef<T>*. This prevents use of
242 // Can't use the #define trick below to guard a bare SkAutoTUnref(...) because it's templated. :(
244 class SkAutoUnref : public SkAutoTUnref<SkRefCnt> {
246 SkAutoUnref(SkRefCnt* obj) : SkAutoTUnref<SkRefCnt>(obj) {}