aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@google.com>2014-06-26 11:04:28 -0400
committerGravatar Mike Klein <mtklein@google.com>2014-06-26 11:04:28 -0400
commit93fabf4847b4784ffabb8d81e722e14d88c92804 (patch)
tree0e8962df8fa20cb40ddf06035bb6b0c6920d0da9
parent3f547cb6a7fcb86d01e063b99c2d8b79d356e87f (diff)
Don't set SK_MALLOC_TEMP in SkAutoTMalloc.
Unlike SkAutoSTMalloc, it doesn't make sense for SkAutoTMalloc to set SK_MALLOC_TEMP. See SkAutoMalloc/SkAutoSMalloc for similar in the void* world.(This change is a documentation-only no-op. No code pays any attention to SK_MALLOC_TEMP.) BUG=skia: R=halcanary@google.com Review URL: https://codereview.chromium.org/356913003
-rw-r--r--include/core/SkTemplates.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/core/SkTemplates.h b/include/core/SkTemplates.h
index a6248f547f..5d3fa2d10c 100644
--- a/include/core/SkTemplates.h
+++ b/include/core/SkTemplates.h
@@ -330,7 +330,7 @@ public:
/** Allocates space for 'count' Ts. */
explicit SkAutoTMalloc(size_t count) {
- fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | SK_MALLOC_TEMP);
+ fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW);
}
~SkAutoTMalloc() {
@@ -345,7 +345,7 @@ public:
/** Resize the memory area pointed to by the current ptr without preserving contents. */
void reset(size_t count) {
sk_free(fPtr);
- fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | SK_MALLOC_TEMP);
+ fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW);
}
T* get() const { return fPtr; }