Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Unified Diff: include/core/SkRefCnt.h

Issue 23904003: Remove GrRefCnt.h in favor of SkRefCnt.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rm GrRefCnt.h Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/public_headers.gypi ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRefCnt.h
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 87ff7dba9fcd338b424ba404f7abab2632ab4fb4..35f7349778035c4071cacd4979c85c5066e1ddbc 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -160,6 +160,13 @@ template <typename T> static inline void SkSafeUnref(T* obj) {
}
}
+template<typename T> static inline void SkSafeSetNull(T*& obj) {
+ if (NULL != obj) {
+ obj->unref();
+ obj = NULL;
+ }
+}
+
///////////////////////////////////////////////////////////////////////////////
/**
« no previous file with comments | « gyp/public_headers.gypi ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698