Thank you for reporting this bug. We will make it our priority to review this report.
  1. #11
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    FWIW, the *leanest* code (does not recreate strings, objects, etc);

    Code:
    var success_handler = function(response, opts){
            makeRequest();
        },
        failure_handler =  function(){
            makeRequest();
        },
        ajaxCfg = {
           url: 'router.php',
           success: success_handler,
           failure: failure_handler,
           params:  { 
                foo: 'bar' 
            }
        };
    
    
    function makeRequest(){
        Ext.Ajax.request(ajaxCfg);
    }
    
    makeRequest();

  2. #12
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    He only sets value - I would expect that that cannot/shouldn't cause the leak.
    DOM manipulation is one of the leading causes of memory leaks, IMHO. each browser acts differently.

  3. #13
    Sencha User
    Join Date
    Jun 2009
    Posts
    750
    Vote Rating
    0
    meroy is on a distinguished road

      0  

    Default


    This has been entered into Trac. Thanks!

  4. #14
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    59
    Vote Rating
    3
    wsi is on a distinguished road

      0  

    Default


    Thank you, what is Trac?

  5. #15
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    95
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Trac is the issue tracker used internally by the Sencha team.

  6. #16
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Midwest, USA
    Posts
    96
    Vote Rating
    2
    Reimius is on a distinguished road

      0  

    Default


    Sorry to respond to such an old thread, but this leak is still apparent in Ext 4.0.7 even. I have tested it on IE9 and it seems that the test case will leak more if you return a larger dataset from the server. The odd thing is that the current version of Google Chrome does not leak. With my test case I have also noticed that the memory does hit a ceiling and then stop (but I'm not sure why). I have been using Drip to test the explorer leak after reports of our actually application crashing browsers.memory_leak.png
    The only difference between my test cases with 4.0.7 and 3.2.1 is that 4.0.7 takes about 3x longer to get to the same ceiling. I can provide my test cases if that will help.

    And just so you know, the ceiling it hits is not reasonable for our actual user base, it's about 1.7 Gb

  7. #17
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Midwest, USA
    Posts
    96
    Vote Rating
    2
    Reimius is on a distinguished road

      0  

    Default


    Hello again,

    According to my research and testing, the issue is with this code in the Ext Base in 3.2.1:
    Code:
    function handleReadyState(o, callback){    callback = callback || {};
            var conn = o.conn,
                tId = o.tId,
                poll = pub.poll,
                cbTimeout = callback.timeout || null;
    
    
            if (cbTimeout) {
                pub.conn[tId] = conn;
                pub.timeout[tId] = setTimeout(function() {
                    pub.abort(o, callback, true);
                }, cbTimeout);
            }
    
    
            poll[tId] = setInterval(
                function() {
                    if (conn && conn.readyState == 4) {
                        clearInterval(poll[tId]);
                        poll[tId] = null;
    
    
                        if (cbTimeout) {
                            clearTimeout(pub.timeout[tId]);
                            pub.timeout[tId] = null;
                        }
    
    
                        handleTransactionResponse(o, callback);
                    }
                },
                pub.pollInterval);
        }
    the variable conn should not be referenced within the onreadystatechange, and 'this' should be used instead. There are also other variables being used from the outer scope and I'm not sure how to handle those, but according to the section: XmlHttpRequest memory management and leaks on this page: "http://javascript.info/tutorial/memo...js-memory-leak" this code will cause a memory leak. And I have tested from within my app to verify that it happens.

    Since 4.0.7 also leaks in the same manner, I assume this code has been carried over, or is still similar. I'm also surprised that more people haven't had this problem.

  8. #18
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Midwest, USA
    Posts
    96
    Vote Rating
    2
    Reimius is on a distinguished road

      0  

    Default


    Actually, after more review of the code, I'm not sure if my last post makes sense, but I'm going to leave it there because I believe the issue is still around that code area.

  9. #19
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Midwest, USA
    Posts
    96
    Vote Rating
    2
    Reimius is on a distinguished road

      0  

    Default


    I saw this thread again today... fyi, the source of the problem (or one of the sources, or part of the problem) is the way Extjs decodes json (which is used in the ajax call). It uses the eval function which is known to cause memory leaks when used. To work around this I used jQuery's ajax call (which is the only framework I could find that didn't leak in all browsers) and json_parse from https://github.com/douglascrockford/.../json_parse.js which does not use eval to avoid memory leaks. Just posting this to help others in the same situation as I, and maybe to help the Ext with their own solution to this problem.

  10. #20
    Sencha Premium Member
    Join Date
    Jul 2010
    Posts
    18
    Vote Rating
    0
    dracofyre is on a distinguished road

      0  

    Default


    Any more information on this topic?

Similar Threads

  1. [OPEN-1001] Memory leak on buttons inside a window
    By VT-TizianoF in forum Ext 3.x: Bugs
    Replies: 2
    Last Post: 14 Oct 2010, 11:37 PM
  2. Replies: 14
    Last Post: 9 Dec 2009, 9:40 AM
  3. Partial solution to memory leak by ajax
    By sean.zhou in forum Community Discussion
    Replies: 4
    Last Post: 18 Nov 2008, 9:35 AM
  4. [2.2] Ext.QuickTips + ASP.NET AJAX = IE Memory Leak?
    By SeiginoRaikou in forum Ext 2.x: Bugs
    Replies: 14
    Last Post: 23 Sep 2008, 12:40 PM
  5. Ext.QuickTips + ASP.NET AJAX = IE Memory Leak?
    By SeiginoRaikou in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 15 Sep 2008, 9:19 PM

Thread Participants: 7

Tags for this Thread