Home > actionscript, bugs, flex > major Flash Player GC bug converting string to XML

major Flash Player GC bug converting string to XML

When converting a string to XML the memory used by the XML will never free up no matter the references or garbage collection tricks you have up your sleeve.  This is really excruciating when needing to parse large XML files from a Flex or AIR app.

http://bugs.adobe.com/jira/browse/SDK-11982

http://bugs.adobe.com/jira/browse/SDK-11244

http://bugs.adobe.com/jira/browse/FP-599 <- Looks like this issue has been open for well over a year and may be fixed for the next release of Flash Player (apparently not 10.0.42.34 released a few days ago, just checked, perhaps they mean the next full release :/)

UPDATE: Luca in the comments pointed me to an apparent fix they’ve added to AIR 1.5.2 via System.disposeXML(xml) found in the release notes here.

I’ve verified that this new method works like a charm. It seams like a bit of a strange one-off hack that they’ve put it in under System for AIR only but I’m guessing that they wanted to address it quickly for the SDK that needed it most. Hopefully the regular Flash Player fix is coming in the next major update and won’t require this unusual method.

Categories: actionscript, bugs, flex Tags:
  1. December 20th, 2009 at 22:27 | #1

    I think that in AIR you have from 1.5.2 version a new static method called disposeXML to make available for garbage collection your XML.
    More info in AIR release notes: http://www.adobe.com/support/documentation/en/air/1_5_2/releasenotes_developers.html

  2. December 20th, 2009 at 22:40 | #2

    @luca that is amazing, thanks for the heads up! I’ll look into it

  1. No trackbacks yet.