Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Get utility, IE, onreadystatechange and memory leak

Expand Messages
  • Arnaud Diederen
    ... Done. Thank you! A.
    Message 1 of 7 , Jun 2, 2008
    • 0 Attachment
      Adam Moore wrote:
      On Wed, May 28, 2008 at 10:25:58AM -0000, yaundro wrote:
        
      judging from what I can see in the windows process explorer, by
      looking at the Get.js code, and in IE7's new js-memoryleak toolbar's
      reported leaks (set up so that it also reports IE6 leaks), it appears
      that:
      
      In IE, the "onreadystatechange" handler that is attached to the
      <script> and <link> nodes is not removed when the resource is done
      loading; which can lead to memory leaks.
      
      [Note that the "onreadystatechange" handler is removed when an
      "autopurge" occurs, but those happen every 20 node insertion.]
      
      Should I file a bug in the tracker?
          
      Yes, the tracker is the right place for this.  Please file a report,
      and I'll look into it.
        

      Done.
      Thank you!

              A.

      Thanks,
      
      -Adam
        

    • tssha
      ... How about implementing either of the following solutions? 1) Set the autopurge threshold to a lower limit to trigger autopurge more frequently (e.g.,
      Message 2 of 7 , Jun 2, 2008
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, Arnaud Diederen <ad@...> wrote:
        >
        > Hello again team,
        >
        > this issue does not seem to passionate anyone, which I can understand ;)
        > However, if I'm right, I think this would be a rather important problem.
        > Can somebody tell me whether I've missed something obvious or whether
        > there's, indeed, a (potentially important) memory leak in there?

        How about implementing either of the following solutions?

        1) Set the autopurge threshold to a lower limit to trigger autopurge
        more frequently (e.g., YAHOO.util.Get.PURGE_THRESH = n)?

        2) Call the purge() method of the argument object to explicitly remove
        the script node?

        Regards,
        Thomas
      • Arnaud Diederen
        Hi Thomas, ... Sure, that d help. The point here is that the YUI does quite a few things on unload of the page (destroying the DnD entries that are left, ...)
        Message 3 of 7 , Jun 3, 2008
        • 0 Attachment

          Hi Thomas,

          tssha wrote:
          --- In ydn-javascript@yahoogroups.com, Arnaud Diederen <ad@...> wrote:
            
          Hello again team,
          
          this issue does not seem to passionate anyone, which I can understand ;)
          However, if I'm right, I think this would be a rather important problem.
          Can somebody tell me whether I've missed something obvious or whether 
          there's, indeed, a (potentially important) memory leak in there?
              
          How about implementing either of the following solutions?
          
          1) Set the autopurge threshold to a lower limit to trigger autopurge
          more frequently (e.g., YAHOO.util.Get.PURGE_THRESH = n)?
          
          2) Call the purge() method of the argument object to explicitly remove
          the script node?
            

          Sure, that'd help.

          The point here is that the YUI does quite a few things on unload of the page (destroying the DnD entries that are left, ...) so I figured it might be worth put a handler that'd take care of the imported script nodes in the YUI itself, rather than every YUI API user having to know and care about that limitation.
          (actually, in this case, I'm not sure putting an onunload handler is the best solution: the YUI Get utility is aware when a script is loaded, so it might remove the onreadystatechange handler right away, couldn't it?)

          Meanwhile, I can still use the workarounds you proposed!

          Regards,
                A.

          Regards,
          Thomas
          
          
          
          
          ------------------------------------
          
          Yahoo! Groups Links
          
          <*> To visit your group on the web, go to:
              http://groups.yahoo.com/group/ydn-javascript/
          
          <*> Your email settings:
              Individual Email | Traditional
          
          <*> To change settings online go to:
              http://groups.yahoo.com/group/ydn-javascript/join
              (Yahoo! ID required)
          
          <*> To change settings via email:
              mailto:ydn-javascript-digest@yahoogroups.com 
              mailto:ydn-javascript-fullfeatured@yahoogroups.com
          
          <*> To unsubscribe from this group, send an email to:
              ydn-javascript-unsubscribe@yahoogroups.com
          
          <*> Your use of Yahoo! Groups is subject to:
              http://docs.yahoo.com/info/terms/
          
            

        Your message has been successfully submitted and would be delivered to recipients shortly.