fix memory leak
This commit is contained in:
parent
078d11c324
commit
036e9e0b82
1 changed files with 4 additions and 0 deletions
|
@ -248,21 +248,25 @@ void drawOneWayPaints(RenderingContext* rc, SkCanvas* cv, SkPath* p) {
|
||||||
p->setStrokeWidth(1);
|
p->setStrokeWidth(1);
|
||||||
p->setPathEffect(arrowDashEffect1)->unref();
|
p->setPathEffect(arrowDashEffect1)->unref();
|
||||||
oneWayPaints.push_back(*p);
|
oneWayPaints.push_back(*p);
|
||||||
|
delete p;
|
||||||
|
|
||||||
p = oneWayPaint();
|
p = oneWayPaint();
|
||||||
p->setStrokeWidth(2);
|
p->setStrokeWidth(2);
|
||||||
p->setPathEffect(arrowDashEffect2)->unref();
|
p->setPathEffect(arrowDashEffect2)->unref();
|
||||||
oneWayPaints.push_back(*p);
|
oneWayPaints.push_back(*p);
|
||||||
|
delete p;
|
||||||
|
|
||||||
p = oneWayPaint();
|
p = oneWayPaint();
|
||||||
p->setStrokeWidth(3);
|
p->setStrokeWidth(3);
|
||||||
p->setPathEffect(arrowDashEffect3)->unref();
|
p->setPathEffect(arrowDashEffect3)->unref();
|
||||||
oneWayPaints.push_back(*p);
|
oneWayPaints.push_back(*p);
|
||||||
|
delete p;
|
||||||
|
|
||||||
p = oneWayPaint();
|
p = oneWayPaint();
|
||||||
p->setStrokeWidth(4);
|
p->setStrokeWidth(4);
|
||||||
p->setPathEffect(arrowDashEffect4)->unref();
|
p->setPathEffect(arrowDashEffect4)->unref();
|
||||||
oneWayPaints.push_back(*p);
|
oneWayPaints.push_back(*p);
|
||||||
|
delete p;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < oneWayPaints.size(); i++) {
|
for (size_t i = 0; i < oneWayPaints.size(); i++) {
|
||||||
|
|
Loading…
Reference in a new issue