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

Unified Diff: include/core/SkTypes.h

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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/SkRefCnt.h ('k') | include/private/SkTDArray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTypes.h
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index b9e519195598de44a66a0b407984c2410ed2d30b..27280d42832bc1f001026f3a0dbd9ea51783e873 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -514,10 +514,10 @@ public:
internal reference to null. Note the caller is reponsible for calling
sk_free on the returned address.
*/
- void* detach() { return this->set(NULL); }
+ void* release() { return this->set(NULL); }
/** Free the current buffer, and set the internal reference to NULL. Same
- as calling sk_free(detach())
+ as calling sk_free(release())
*/
void free() {
sk_free(fPtr);
@@ -535,7 +535,7 @@ private:
/**
* Manage an allocated block of heap memory. This object is the sole manager of
* the lifetime of the block, so the caller must not call sk_free() or delete
- * on the block, unless detach() was called.
+ * on the block, unless release() was called.
*/
class SkAutoMalloc : SkNoncopyable {
public:
@@ -606,7 +606,7 @@ public:
internal reference to null. Note the caller is reponsible for calling
sk_free on the returned address.
*/
- void* detach() {
+ void* release() {
void* ptr = fPtr;
fPtr = NULL;
fSize = 0;
« no previous file with comments | « include/core/SkRefCnt.h ('k') | include/private/SkTDArray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698