<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - SVG polyline and polygon leak page"
   href="https://bugs.webkit.org/show_bug.cgi?id=152759#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - SVG polyline and polygon leak page"
   href="https://bugs.webkit.org/show_bug.cgi?id=152759">bug 152759</a>
              from <span class="vcard"><a class="email" href="mailto:chris.vno&#64;outlook.com" title="Chris Vienneau &lt;chris.vno&#64;outlook.com&gt;"> <span class="fn">Chris Vienneau</span></a>
</span></b>
        <pre>I initially stated that polyline and polygon leak, I now believe in fact any svg node that creates a SVGAnimatedProperty will leak.  It just so happens that polyline and polygon always create it.  In older code based on based on 157437 the SVGAnimatedProperty would be created less often for polyline and polygon, additionally when it was created it didn't leak.

For now i'm using a workaround by restoring WebCore\rendering\svg\SVGPathData.cpp updatePathFromPolygonElement() and updatePathFromPolylineElement() to their older version in order to hit the failure case less often.  I'm also immediately releasing the reference kept on the &quot;SVGElement* contextElement&quot; in SVGAnimatedProperty constructor; so when the error case happens we don't leak the whole page (only the SVGAnimatedProperty).  

This greatly reduces the memory leaked and our soaks come out pretty good now. and I haven't encountered any issue with releasing the ref early.  I'm moving on to other more urgent issues for the time being, these workarounds I'm using i only consider temporary, I'd be interested in a better fix if one becomes available.

Chris</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>