Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK 3.0 (Release)
-
None
-
None
-
Affected OS(s): Windows
Affected OS(s): Windows XP
Browser: Firefox 3.x
Language Found: English
Description
Steps to reproduce:
1. Change the backgroundGradientColors style on the component via binding or setStyle().
2. Try code below for an example, code also outputs current memory usage in Mb.
3. Code also attached:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
initialize="setup(event)">
<mx:Label x="236" y="106" text="0" fontSize="36" color="#FFFFFF" id="mem0"/>
<mx:Label x="236" y="164" text="0" fontSize="36" color="#FFFFFF" id="mem1"/>
<mx:Label x="236" y="222" text="0" fontSize="36" color="#FFFFFF" id="mem2"/>
<mx:Script>
<![CDATA[
import flash.events.Event;
public const color1:Number = 0x000000;
public const color2bottom:Number = 0xF0FF00;
public const color2top:Number = 0xFF0000;
public const color2step:Number = 0x00500;
public var color2:Number = color2bottom;
public var timer:Timer;
public var colors:Array = new Array();
public function setup(event:Event):void
{ colors[0] = color1; timer = new Timer(5000,0); timer.addEventListener(TimerEvent.TIMER,collectMemory); timer.start(); this.addEventListener(Event.ENTER_FRAME, updateScreen); } public function updateColor2():void
{
if(color2 != color2top)
else color2 = color2bottom;
}
public function updateScreen(event:Event):void
{ updateColor2(); colors[1] = color2; this.setStyle("backgroundGradientColors",[color1,color2]); }protected function collectMemory(event:TimerEvent):void
{ mem2.text = mem1.text; mem1.text = mem0.text; mem0.text = String(flash.system.System.totalMemory/(1024*1024)); } ]]
>
</mx:Script>
<mx:Label x="54" y="106" text="Last 05s:" fontSize="36" color="#FFFFFF"/>
<mx:Label x="235" y="23" text="Memory allocated in Mb" fontSize="36" color="#FFFFFF"/>
<mx:Label x="54" y="164" text="Last 10s:" fontSize="36" color="#FFFFFF"/>
<mx:Label x="54" y="222" text="Last 15s:" fontSize="36" color="#FFFFFF"/>
</mx:Application>
Actual Results:
Memory keeps on increasing.
Expected Results:
Memory stopping to increase after some minutes.
Workaround (if any):
Couldn't find any so far.
Notes:
I've also tried creating an array object, changing it's value and the using it on the setStyle() function, that didn't work either.