Index: include/core/SkRefCnt.h |
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h |
index 9e3a92eb9ac836af538eddcb8b02cc4fb4128a65..f92154bc2f86f1098a02a61fb9b46c1d46753e2a 100644 |
--- a/include/core/SkRefCnt.h |
+++ b/include/core/SkRefCnt.h |
@@ -248,36 +248,4 @@ public: |
}; |
#define SkAutoUnref(...) SK_REQUIRE_LOCAL_VAR(SkAutoUnref) |
-/** 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); } |
- SkRefPtr(const SkRefPtr& o) : fObj(o.fObj) { SkSafeRef(fObj); } |
- ~SkRefPtr() { SkSafeUnref(fObj); } |
- |
- SkRefPtr& operator=(const SkRefPtr& rp) { |
- SkRefCnt_SafeAssign(fObj, rp.fObj); |
- return *this; |
- } |
- SkRefPtr& operator=(T* obj) { |
- SkRefCnt_SafeAssign(fObj, obj); |
- return *this; |
- } |
- |
- T* get() const { return fObj; } |
- T& operator*() const { return *fObj; } |
- T* operator->() const { return fObj; } |
- |
- typedef T* SkRefPtr::*unspecified_bool_type; |
- operator unspecified_bool_type() const { |
- return fObj ? &SkRefPtr::fObj : NULL; |
- } |
- |
-private: |
- T* fObj; |
-}; |
- |
#endif |