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