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

Unified Diff: include/private/SkTemplates.h

Issue 1516833003: Switch SkAutoMalloc to SkAutoTMalloc to avoid cast (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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
Index: include/private/SkTemplates.h
diff --git a/include/private/SkTemplates.h b/include/private/SkTemplates.h
index 533cb264d163ee7354f1e53de7bac4a2de36cd61..e91b796782708e5d517e8cf606276a5340971e51 100644
--- a/include/private/SkTemplates.h
+++ b/include/private/SkTemplates.h
@@ -296,6 +296,13 @@ public:
}
/**
+ * Releases the block back to the heap
+ */
+ void free() {
reed1 2015/12/10 16:04:12 seemes like a fine method/name. Does SkAutoMalloc
scroggo 2015/12/10 16:26:45 Yes. That supports my desire to make reset() retur
+ this->reset(0);
+ }
+
+ /**
* Transfer ownership of the ptr to the caller, setting the internal
* pointer to NULL. Note that this differs from get(), which also returns
* the pointer, but it does not transfer ownership.

Powered by Google App Engine
This is Rietveld 408576698