Valgrind sez: new[] wants delete[].
authormtklein <mtklein@chromium.org>
Thu, 9 Apr 2015 10:20:04 +0000 (03:20 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 9 Apr 2015 10:20:04 +0000 (03:20 -0700)
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/17/steps/dm/logs/stdio

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1075853002

src/gpu/GrResourceCache.cpp

index f1a51b0..ae9c68f 100644 (file)
@@ -83,7 +83,7 @@ GrResourceCache::GrResourceCache()
 
 GrResourceCache::~GrResourceCache() {
     this->releaseAll();
-    SkDELETE(fFlushTimestamps);
+    SkDELETE_ARRAY(fFlushTimestamps);
 }
 
 void GrResourceCache::setLimits(int count, size_t bytes, int maxUnusedFlushes) {
@@ -95,7 +95,7 @@ void GrResourceCache::setLimits(int count, size_t bytes, int maxUnusedFlushes) {
 }
 
 void GrResourceCache::resetFlushTimestamps() {
-    SkDELETE(fFlushTimestamps);
+    SkDELETE_ARRAY(fFlushTimestamps);
 
     // We assume this number is a power of two when wrapping indices into the timestamp array.
     fMaxUnusedFlushes = SkNextPow2(fMaxUnusedFlushes);