Chromium Code Reviews| Index: runtime/vm/profiler.cc |
| diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc |
| index 90d5a46ac786653e7b944a93b757e9aeb6c1a12c..006f032d36e5bab3cb5f4fc8aa9cee561d608b59 100644 |
| --- a/runtime/vm/profiler.cc |
| +++ b/runtime/vm/profiler.cc |
| @@ -579,13 +579,13 @@ SampleBuffer::SampleBuffer(intptr_t capacity) { |
| start_ = 0; |
| end_ = 0; |
| capacity_ = capacity; |
| - samples_ = new Sample[capacity]; |
| + samples_ = reinterpret_cast<Sample*>(calloc(capacity, sizeof(Sample))); |
| } |
| SampleBuffer::~SampleBuffer() { |
| if (samples_ != NULL) { |
| - delete[] samples_; |
| + free(samples_); |
| samples_ = NULL; |
| } |
|
siva
2013/11/27 21:01:55
for completeness:
start_ = 0;
end_ = 0;
capaci
Cutch
2013/11/27 21:48:56
Done.
|
| } |