diff options
author | senorblanco <senorblanco@chromium.org> | 2015-08-06 12:29:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-06 12:29:03 -0700 |
commit | 275412cf3e02dc89040e5a57a7da4ca93127d1fb (patch) | |
tree | d824eb15e849ea3390af537019b47995da1a2ffc /src/gpu/GrTestUtils.cpp | |
parent | 9ce386a27ddcd7be5f4d322e65ef95f14180f640 (diff) |
Plug a leak in GrTestUtils.
TBR=mtklein,bsalomon
Review URL: https://codereview.chromium.org/1274963003
Diffstat (limited to 'src/gpu/GrTestUtils.cpp')
-rw-r--r-- | src/gpu/GrTestUtils.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrTestUtils.cpp b/src/gpu/GrTestUtils.cpp index 714b99f65c..de840cca91 100644 --- a/src/gpu/GrTestUtils.cpp +++ b/src/gpu/GrTestUtils.cpp @@ -244,7 +244,8 @@ GrStrokeInfo TestStrokeInfo(SkRandom* random) { randomize_stroke_rec(&strokeInfo, random); SkPathEffect::DashInfo dashInfo; dashInfo.fCount = random->nextRangeU(1, 50) * 2; - dashInfo.fIntervals = SkNEW_ARRAY(SkScalar, dashInfo.fCount); + SkAutoTDeleteArray<SkScalar> intervals(SkNEW_ARRAY(SkScalar, dashInfo.fCount)); + dashInfo.fIntervals = intervals.get(); SkScalar sum = 0; for (int i = 0; i < dashInfo.fCount; i++) { dashInfo.fIntervals[i] = random->nextRangeScalar(SkDoubleToScalar(0.01), |