git-svn-id: http://skia.googlecode.com/svn/trunk@556 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@android.com 2010-04-16 20:56:00 +00:00
parent b00cd7258c
commit 756f6dd82d

View File

@ -147,8 +147,10 @@ template <typename T> static inline void SkSafeUnref(T* obj) {
}
}
template <typename T>
class SkRefPtr {
/** Wrapper class for SkRefCnt pointers. This manages ref/unref of a pointer to
a SkRefCnt (or subclass) object.
*/
template <typename T> class SkRefPtr {
public:
SkRefPtr() : fObj(NULL) {}
SkRefPtr(T* obj) : fObj(obj) { SkSafeRef(fObj); }