flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Taylor <ja...@dedoose.com>
Subject massive memory leak in Flex
Date Thu, 02 Mar 2017 22:36:36 GMT
I believe I have finally identified the cause of a huge memory leak in our application, and
it appears to be s:label
I have tested this on many different framework versions.

Please try the following:    if you make a custom itemrender and don't use the s:label it
goes away, note disabiling TextLineReycler has no effect.  

Using task manager, scout, and IntelliJ Idea Flex profiler all confirm the memory leak.  This
seems like a massive issue and has been causing a lot of slowdown and crashes in our app.
I'm guessing I must have messed something up somewhere as I don't see how sucha  massive issue
could have been in the framework for soo long (Tested 4.13, 4.14, and 4.15).  Please Advise.
~ JT

<?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 = 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;

View raw message