Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Later
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
The code for mx:List in both SDK 3.4 and SDK 4.0 is:
mx_internal function purgeMeasuringRenderers():void
{ var item:IListItemRenderer; for each (item in measuringObjects) if (item.parent) item.parent.removeChild(DisplayObject(item)); if (!measuringObjects) measuringObjects = new Dictionary(true); }In the last "if" clause, a new Dictionary is created only if measuringObject is null. If measuringObjects exists, then the items are removed from their parent by the "for" loop, but the items themselves remain in the measuringObjects Dictionary. This is a memory leak.
I believe the intent of the function is the following:
mx_internal function purgeMeasuringRenderers():void
{
if (measuringObjects)
measuringObjects = new Dictionary(true);
}