Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    14
    Vote Rating
    0
    kuzynpiy is on a distinguished road

      0  

    Default problem with memory leak

    problem with memory leak


    Hello,

    I’ve got the problem with memory leak. I use IE engine and when I refresh the page (clicking F5 in IE) the browser has increased the memory by about 500kB to 1MB. Its terrible.
    When I remove Your extension to YUI – I mean the line:
    Code:
    <script></script>
    memory is stable and does not leak.
    Have You any idea of how to resolve this problem ?

    Peter

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    Just because the memory increases when you reload a page doesn't indicate a leak. It could indicate IE is caching things. 95% Leaks in IE are created by putting JS Objects on DOM nodes and I never do that. However, if you can point me to a link with the problem, I'd be happy to test it for leaks.

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    14
    Vote Rating
    0
    kuzynpiy is on a distinguished road

      0  

    Default


    The test page is located at:
    http://interpc.pl/~pwywiol/test/splitter.htm
    It's almost an empty page (with dblClick on splitter implemented by code You sent me).

    Try refresh the page to see the memory used by the browser increase. I test it only on IE engine.

    I add the purge function to the javascript code. Now the memory leak slowly.

    Peter

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    It could be because you are using legacy event handlers. Try using YAHOO.util.Event for load and unload and see if that changes anything.

    Code:
    YAHOO.util.Event.on(window, 'load', yourLoadFcn); 
    YAHOO.util.Event.on(window, 'unload', yourUnloadFcn);
    Inline load and unload handlers aren't cleaned up and could prevent normal cleanup.

  5. #5
    Ext User
    Join Date
    Mar 2007
    Posts
    11
    Vote Rating
    0
    fab is on a distinguished road

      0  

    Default


    first of all, this stuff really *rocks*
    i came across this site searching for a grid widget and i found a lot more.

    now, i tested:
    http://www.jackslocum.com/blog/examples/layout1.htm
    with drip to check MSIE memory.

    drip does not find any leak, however memory usage increment on every reload by 1M.
    it goes like this (Mb): 16,17,18,19...100,101,102.... etc, etc. and memory get freed only restarting drip.

    if it is not a leak, why IE keep eating memory on every refresh ?

  6. #6
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    could IE be caching each instance of the JS pulled, due to the fact it's being served via php?

    on a side note:

    95% Leaks in IE are created by putting JS Objects on DOM nodes
    Does that include using onClick for dom nodes? If so looks like I am going to need to refactor a lot of my work.

  7. #7
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    3
    tryanDLS is on a distinguished road

      0  

    Default


    I think that depends on how you handle adding the onclick event. I think there was some discussion about how the yui-ext event model deals with this - not sure if on the blog or here. Here's a article that talks about some of the issues too.

    http://javascript.crockford.com/memory/leak.html

    This site has a lot of good articles about javascript - Crockford is the guy who created the JSON notation.

  8. #8
    Ext User
    Join Date
    Mar 2007
    Posts
    11
    Vote Rating
    0
    fab is on a distinguished road

      0  

    Default


    Quote Originally Posted by jbowman
    could IE be caching each instance of the JS pulled, due to the fact it's being served via php?
    drip reports the same problem on a local copy with normal .js serving.

  9. #9
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    As I said, it is probably IE caching page state. Most modern browsers (FireFox and Safari too) not only cache the scripts in the page but also the state of those scripts. This is how they can do quick forward backward navigation etc. If drip says no leaks, chances are there probably aren't any leaks.

  10. #10
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    jbowman, using legacy event handlers like onclick aren't directly a source of leaks. But if you assign them in javascript where the handler's closure could also be wrapping the same DOM node, there's a high probability for a leak. For example:

    Code:
    function foo(node){
        node.onclick = function(){
            alert(node.id + ' was clicked.';
        }
    }
    That creates a circular reference that is bad. The onclick function has a closure containing the node, and the node has a property (onclick) that contains the function. This is where the big closure scare came from.

Similar Threads

  1. iframe cause memery leak in IE6?
    By jasspier in forum Ext 1.x: Bugs
    Replies: 5
    Last Post: 26 Sep 2007, 4:39 AM
  2. [SOLVED] Memory Leak in Paging Grid Example?
    By cobnet in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 3 May 2007, 8:24 PM
  3. Grid DataModel keeps data in memory
    By tane in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 24 Feb 2007, 12:38 PM
  4. Memory Leak issue when using startAutoRefresh
    By wanderingwalrus in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 6 Feb 2007, 9:32 PM
  5. Replies: 1
    Last Post: 5 Dec 2006, 5:41 AM

Thread Participants: 5