| Index: bench/GrMemoryPoolBench.cpp
|
| ===================================================================
|
| --- bench/GrMemoryPoolBench.cpp (revision 8748)
|
| +++ bench/GrMemoryPoolBench.cpp (working copy)
|
| @@ -11,8 +11,8 @@
|
| #include "GrMemoryPool.h"
|
| #include "SkBenchmark.h"
|
| #include "SkRandom.h"
|
| -#include "SkTScopedPtr.h"
|
| #include "SkTDArray.h"
|
| +#include "SkTemplates.h"
|
|
|
| // change this to 0 to compare GrMemoryPool to default new / delete
|
| #define OVERRIDE_NEW 1
|
| @@ -107,14 +107,14 @@
|
| enum {
|
| kMaxObjects = 4 * (1 << 10),
|
| };
|
| - SkTScopedPtr<A> objects[kMaxObjects];
|
| + SkAutoTDelete<A> objects[kMaxObjects];
|
|
|
| for (int i = 0; i < N; i++) {
|
| uint32_t idx = r.nextRangeU(0, kMaxObjects-1);
|
| if (NULL == objects[idx].get()) {
|
| objects[idx].reset(new A);
|
| } else {
|
| - objects[idx].reset(NULL);
|
| + objects[idx].free();
|
| }
|
| }
|
| }
|
|
|