flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Taylor <ja...@dedoose.com>
Subject RE: massive memory leak in Flex
Date Thu, 02 Mar 2017 23:55:40 GMT
Scout is showing 1.5Gb used after 4m, and constantly climbing, however task manager is not
reporting the same at all...
In scout it showing 1.38GB of that is "Other Bitmap Memory"

-----Original Message-----
From: Jason Taylor [mailto:jason@dedoose.com] 
Sent: Thursday, March 02, 2017 3:50 PM
To: dev@flex.apache.org
Subject: RE: massive memory leak in Flex

This is all the code needed to cause it, and no it does not appear to stop, though I will
need to run it for awhile to blow all my memory in this comp.

<?xml version="1.0"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
    <s:List width="100%" height="100%" id="list"/>
        import mx.collections.ArrayCollection;
        import mx.events.FlexEvent;

        private var _bindTimer:Timer;

        private function OnCreationComplete(event:FlexEvent):void
            _bindTimer = new Timer(500);
            _bindTimer.addEventListener(TimerEvent.TIMER, OnBindTimerTick, false, 0, true);

        private function OnBindTimerTick(event:TimerEvent):void

        private function BindData():void
            var items:Array = [];
            for (var i:uint = 0; i < 100; i++)
            list.dataProvider = null;
            list.dataProvider = new ArrayCollection(items);

        private function GenerateRandomString(strlen:Number):String
            var chars:String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
            var num_chars:Number = chars.length - 1;
            var randomChar:String = "";

            for (var i:Number = 0; i < strlen; i++)
                randomChar += chars.charAt(Math.floor(Math.random() * num_chars));
            return randomChar;

-----Original Message-----
From: Alex Harui [mailto:aharui@adobe.com]
Sent: Thursday, March 02, 2017 3:47 PM
To: dev@flex.apache.org
Subject: Re: massive memory leak in Flex

Jason, we aren't seeing all of the code.  Can you put all of the code in a JIRA issue?

There is a notion of outrunning GC.  And also memory fragmentation.  How high does memory
go?  Does it cap out or will it blow up for lack of memory at some point?


On 3/2/17, 3:39 PM, "Jason Taylor" <jason@dedoose.com> wrote:

>yeah you can remove that, right now mine is just
><?xml version="1.0"?>
><s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
>                xmlns:Core="CoreClasses.*">
>    <Core:MyLabel width="100%" height="100%" text="{data}"/> 
>where MyLabel is a copy of s:label so I can make changes and try to 
>figure out where the hell this is coming from, appears to be deep in 
>-----Original Message-----
>From: Justin Mclean [mailto:justin@classsoftware.com]
>Sent: Thursday, March 02, 2017 3:38 PM
>To: dev@flex.apache.org
>Subject: Re: massive memory leak in Flex
>What's the code for your TestItemRenderer? If you remove that does it 
>act the same?

View raw message