Fix minor memory leaks
https://codereview.chromium.org/12703044/
git-svn-id: http://skia.googlecode.com/svn/trunk@8419 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/dashing.cpp b/gm/dashing.cpp
index 7fe3029..bbd0b65 100644
--- a/gm/dashing.cpp
+++ b/gm/dashing.cpp
@@ -202,7 +202,7 @@
SkScalar intervals[2] = { dashLength, dashLength };
- p.setPathEffect(new SkDashPathEffect(intervals, 2, phase, false));
+ p.setPathEffect(new SkDashPathEffect(intervals, 2, phase, false))->unref();
SkPoint pts[2];
diff --git a/gm/shallowgradient.cpp b/gm/shallowgradient.cpp
index 672193d..fd14943 100644
--- a/gm/shallowgradient.cpp
+++ b/gm/shallowgradient.cpp
@@ -58,7 +58,7 @@
SkSize size = SkSize::Make(r.width(), r.height());
SkPaint paint;
- paint.setShader(fProc(colors, colorCount, size));
+ paint.setShader(fProc(colors, colorCount, size))->unref();
canvas->drawRect(r, paint);
}