[CLOSED] memory leaks

  1. #1

    [CLOSED] memory leaks

    My ext.net-based application suffered from memory leaks.

    I could not find by myself what exactly caused the leaks, so I asked Microsoft to help me find them.
    They investigated my memory dump and reported that some of the memory leaks were caused by ext.net code.

    Here is the list of what Microsoft has discovered:


    Leaking functions summary
    This function leaked 4 times
    function(J){var G=Ext.lib.Event,H,M,K,F,I,N;for(F in f){K=f[F];for(H=0,I=K.length;H<I;H++){M=K[H];if(M){try{N=M[w]?(M[w]===true?M[s]:M[w]):k;M[i].call(N,G.getEvent(J),M[s])}catch(L){}}}}Ext.EventManager._unload();h(k,g,G._unload)}
    This function leaked 4 times
    function a(){var d=Function.prototype;delete d.createSequence;delete d.defer;delete d.createDelegate;delete d.createCallback;delete d.createInterceptor;window.detachEvent("onunload",a)}
    This function leaked 4 times
    function k(){if(!Ext.enableGarbageCollector){clearInterval(e.collectorThreadId)}else{var m,p,s,q;for(m in a){q=a[m];if(q.skipGC){continue}p=q.el;s=p.dom;if(!s||!s.parentNode||(!s.offsetParent&&!h.getElementById(m))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(s)}delete a[m]}}if(Ext.isIE){var n={};for(m in a){n[m]=a[m]}a=Ext.elCache=n}}}
    This function leaked 4 times
    function K(O){if(!Ext){return}O=Ext.EventObject.setEvent(O);var N;if(E.delegate){if(!(N=O.getTarget(E.delegate,G))){return}}else{N=O.target}if(E.stopEvent){O.stopEvent()}if(E.preventDefault){O.preventDefault()}if(E.stopPropagation){O.stopPropagation()}if(E.normalized===false){O=O.browserEvent}L.call(M||G,O,N,E)}
    This function leaked 4 times
    function g(){if(M){return}try{var ac=l.getElementsByTagName("body")[0].appendChild(F("span"));ac.parentNode.removeChild(ac)}catch(ad){return}M=true;var aa=X.length;for(var ab=0;ab<aa;ab++){X[ab]()}}
    This function leaked 4 times
    f
    unction(){var af=L.length;for(var ae=0;ae<af;ae++){L[ae][0].detachEvent(L[ae][1],L[ae][2])}var ac=Q.length;for(var ad=0;ad<ac;ad++){B(Q[ad])}for(var ab in P){P[ab]=null}P=null;for(var aa in swfobject){swfobject[aa]=null}swfobject=null}
    This function leaked 4 times
    function(){var tip=Ext.QuickTips.getQuickTip();if(tip){tip.disabled=true;}}
    This function leaked 4 times
    function(){var b={};try{b=Sys.UI.DomElement._getWindow(a).event}catch(c){}return e.call(a,new Sys.UI.DomEvent(b))}
    This function leaked 2 times
    function(){return b.apply(a,arguments)}
    This function leaked 1 times
    function(){var f=b||arguments;if(a===true){f=Array.prototype.slice.call(arguments,0);f=f.concat(b)}else{if(Ext.isNumber(a)){f=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(f,e)}}return d.apply(c||window,f)}
    This function leaked 1 times
    function(){if(a._xmlHttpRequest.readyState===4){try{if(typeof a._xmlHttpRequest.status==="undefined")return}catch(b){return}a._clearTimer();a._responseAvailable=true;try{a._webRequest.completed(Sys.EventArgs.Empty)}finally{if(a._xmlHttpRequest!=null){a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest=null}}}}
    This function leaked 1 times
    function(){clearInterval(g);g=null;d.apply(c,a||[])}
    Thank you for your support.
    Last edited by Daniil; Apr 01, 2011 at 12:23 PM. Reason: Marked as [CLOSED]. No more information was provided.
  2. #2
    Hi,

    Thanks for details.

    1. The following function are not included to ExtJS (i gues it is MS Ajax client side code)
    function(){var b={};try{b=Sys.UI.DomElement._getWindow(a).event}catch(c){}return e.call(a,new Sys.UI.DomEvent(b))}
    function(){return b.apply(a,arguments)}
    function(){if(a._xmlHttpRequest.readyState===4){try{if(typeof a._xmlHttpRequest.status==="undefined")return}catch(b){return}a._clearTimer();a._responseAvailable=true;try{a._webRequest.completed(Sys.EventArgs.Empty)}finally{if(a._xmlHttpRequest!=null){a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest=null}}}}
    2. Other functions are native ExtJS code. I suggest to post your report to ExtJS forum because we don't change base ExtJS library.
    It would be better if you can create sample which demonstrates the memory leaks because it is required to know in what context those functions are used. Also, under which browser do you have the leaks? Any browser or certain?

Similar Threads

  1. Replies: 12
    Last Post: May 25, 2012, 11:34 AM
  2. TabPanel Control Memory Leaks
    By hpj1106 in forum 1.x Help
    Replies: 1
    Last Post: May 12, 2012, 10:04 AM
  3. Client Side Memory Leaks
    By ecko in forum 1.x Help
    Replies: 3
    Last Post: Nov 02, 2011, 6:22 AM
  4. [CLOSED] qtip leaks out
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Oct 14, 2011, 2:46 PM
  5. Store rebinding and memory leaks
    By wdk in forum 1.x Help
    Replies: 0
    Last Post: Jun 28, 2011, 3:34 AM

Posting Permissions