Ticket #2530446 (closed defect)

Reporter


Stjepan Rajko
Opened: 06/18/11
Last modified: 08/18/11
Status: closed
Type: defect
Resolution: fixed

Owner


Matt Sweeney
Target Release: 3.4.0
Priority: P3 (normal)
Summary: memory leak in Node.replace, when Node.create returns a fragment
Description:

when given a string argument, Node.replace calls Node.create. If Node.create returns a fragment, Node.replace should destroy the fragment, but it doesn't, so the fragment Node stays in _instances.

Please see http://jsfiddle.net/TTNHx/1/ for an example.

Type: defect Observed in Version: 3.3.0
Component: Node Severity: S3 (normal)
Assigned To: Matt Sweeney Target Release: 3.4.0
Location: Priority: P3 (normal)
Tags: memory leak, node, create, replace Relates To:
Browsers: N/A
URL: http://jsfiddle.net/TTNHx/1/
Test Information:

The provided example will leak memory every second, stemming from the calls to replace('<div></div><div></div>'), each of which results in a fragment Node which does not get cleaned up.

Change History

Matt Sweeney

YUI Developer

Posted: 06/27/11
  • milestone changed to 3.4.0
  • priority changed to P3 (normal)
  • status changed from new to accepted

Matt Sweeney

YUI Developer

Posted: 06/27/11
  • estimated changed from 0 to 1
  • remaining changed from 0 to 1

Matt Sweeney

YUI Developer

Posted: 06/27/11
  • sprint changed to sprint 3

Matt Sweeney

YUI Developer

Posted: 07/27/11
  • completed changed from 0 to 0.5
  • remaining changed from 1 to 0
  • status changed from accepted to checkedin

George

YUI Developer

Posted: 08/18/11
  • resolution changed to fixed
  • status changed from checkedin to closed