flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Olajos (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-34768) Memory Leak - Chart Column/Bar Series
Date Wed, 25 Feb 2015 20:06:05 GMT
Jeff Olajos created FLEX-34768:

             Summary: Memory Leak - Chart Column/Bar Series
                 Key: FLEX-34768
                 URL: https://issues.apache.org/jira/browse/FLEX-34768
             Project: Apache Flex
          Issue Type: Bug
          Components: Charts
    Affects Versions: Apache Flex 4.13.0, Apache Flex 4.12.0, Adobe Flex SDK 4.6 (Release)
         Environment: Air running on Windows (XP/Windows7 and Windows 8). Havent tested running
in web browser.
            Reporter: Jeff Olajos
            Priority: Minor

On Column Charts that display (Live) data, if setStyle("labelPosition","none") is specified
(even though it is the default) on the Bar series, the "Label" class leaks memory on every
series refresh (1 Label per Bar).

To demonstrate, run the following code and examine the "Label" class (need to remove standard
filters). If the setStyle("labelPosition","none") is omitted or set to "inside" or "outside"
the Label class instance count remains constant at 1 Label per bar. If the style is specified
as "none", the Label class instance count increments by 1 Label instance per bar each refresh.
In the example below, there are 2 bars displayed.

Here is a simple mxml example. Run as an Air application. It was tested on 4.6, 12 and 13
and always produces the memory leak:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                        import mx.collections.ArrayCollection;
                        import mx.events.FlexEvent;
                        public var data : ArrayCollection = new ArrayCollection();
                        private var mytimer:Timer = new Timer(2000);
                        protected function application1_creationCompleteHandler(event:FlexEvent):void
                        protected function ontimer (e:TimerEvent) : void
                              var o : Object = new Object();
                              o.month= "january";
                              o.expenses = 10;
                              o  = new Object();
                              o.month= "february";
                              o.expenses = 10;
                        protected function mySeries_creationCompleteHandler(event:FlexEvent):void
                              mySeries.labelField = "expenses";
            <mx:ColumnChart dataProvider="{data}">
                        <mx:CategoryAxis categoryField="month"/>
                        <mx:ColumnSeries id="mySeries" creationComplete="mySeries_creationCompleteHandler(event)"/>

This message was sent by Atlassian JIRA

View raw message