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

Unified Diff: include/core/SkRefCnt.h

Issue 2213333002: SkLite* (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: annoying... Created 4 years, 4 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 | « include/core/SkCanvas.h ('k') | src/core/SkLiteDL.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 3227e6874066f7f60fdfd4536df8b6cba153e087..82a3c9e0003d8dae98f9da865b4dbf668862b229 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -101,15 +101,12 @@ public:
protected:
/**
* Allow subclasses to call this if they've overridden internal_dispose
- * so they can reset fRefCnt before the destructor is called. Should only
- * be called right before calling through to inherited internal_dispose()
- * or before calling the destructor.
+ * so they can reset fRefCnt before the destructor is called or if they
+ * choose not to call the destructor (e.g. using a free list).
*/
void internal_dispose_restore_refcnt_to_1() const {
-#ifdef SK_DEBUG
SkASSERT(0 == getRefCnt());
fRefCnt.store(1, std::memory_order_relaxed);
-#endif
}
private:
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/core/SkLiteDL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698