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

Memory leak in YAHOO.util.Get.script() under IE7

Expand Messages
  • zaneta25
    I have to regularely call YAHOO.util.Get.script() to retrieve a script (every 2 seconds). The code (part of an object) is given below: this.queryDeviceInfo =
    Message 1 of 3 , Dec 30, 2008
    • 0 Attachment
      I have to regularely call YAHOO.util.Get.script() to retrieve a
      script (every 2 seconds). The code (part of an object) is given below:

      this.queryDeviceInfo = function(){
      var sUrl = "http://192.168.1.115" +
      "/query_device_info.js?" +
      "callback=GSW.MonView.Monitoring.Basic.JSONCallbackDeviceInfo";

      sUrl += ('&requestId=' + (new Date()).getTime());
      YAHOO.util.Get.script(sUrl,
      {
      onFailure:function()
      {setTimeout(GSW.MonView.Monitoring.Basic.queryDeviceInfo, 2000);},
      onTimeout:function()
      {setTimeout(GSW.MonView.Monitoring.Basic.queryDeviceInfo, 2000);},
      timeout: 5000
      });
      };

      this.JSONCallbackDeviceInfo = function(info){
      setTimeout
      (GSW.MonView.Monitoring.Basic.queryDeviceInfo, 2000);
      };

      The script returns an object wrapped inside the call to my callback
      function GSW.MonView.Monitoring.Basic.JSONCallbackDeviceInfo. The
      callback processes the data returned (this part removed for memory
      leak testing) and sets up a timeout to call
      GSW.MonView.Monitoring.Basic.queryDeviceInfo again and so on.
      Everything works fine with the exception of a serious memory leak
      developed over time.

      Any ideas? I have checked that inserted scripts are correctly purged
      from the head of the document. I would really like to hear from
      someone who knows what is wrong here.
    • Adam Moore
      ... What version of YUI are you using? An IE memory leak was fixed in 2.6.0. If you are using the latest and believe you have found a memory leak caused by
      Message 2 of 3 , Dec 30, 2008
      • 0 Attachment
        On Tue, Dec 30, 2008 at 10:00:29PM -0000, zaneta25 wrote:
        > I have to regularely call YAHOO.util.Get.script() to retrieve a
        > script (every 2 seconds). The code (part of an object) is given below:
        >
        > this.queryDeviceInfo = function(){
        > var sUrl = "http://192.168.1.115" +
        > "/query_device_info.js?" +
        > "callback=GSW.MonView.Monitoring.Basic.JSONCallbackDeviceInfo";
        >
        > sUrl += ('&requestId=' + (new Date()).getTime());
        > YAHOO.util.Get.script(sUrl,
        > {
        > onFailure:function()
        > {setTimeout(GSW.MonView.Monitoring.Basic.queryDeviceInfo, 2000);},
        > onTimeout:function()
        > {setTimeout(GSW.MonView.Monitoring.Basic.queryDeviceInfo, 2000);},
        > timeout: 5000
        > });
        > };
        >
        > this.JSONCallbackDeviceInfo = function(info){
        > setTimeout
        > (GSW.MonView.Monitoring.Basic.queryDeviceInfo, 2000);
        > };
        >
        > The script returns an object wrapped inside the call to my callback
        > function GSW.MonView.Monitoring.Basic.JSONCallbackDeviceInfo. The
        > callback processes the data returned (this part removed for memory
        > leak testing) and sets up a timeout to call
        > GSW.MonView.Monitoring.Basic.queryDeviceInfo again and so on.
        > Everything works fine with the exception of a serious memory leak
        > developed over time.
        >
        > Any ideas? I have checked that inserted scripts are correctly purged
        > from the head of the document. I would really like to hear from
        > someone who knows what is wrong here.

        What version of YUI are you using? An IE memory leak was fixed in
        2.6.0. If you are using the latest and believe you have found a memory
        leak caused by YUI, please file a bug report:

        http://sourceforge.net/tracker/?group_id=165715&atid=836476

        -Adam
      • zaneta25
        ... callback ... memory ... purged ... memory ... I use 2.6.0, downloaded on 11/27/2008.
        Message 3 of 3 , Dec 30, 2008
        • 0 Attachment
          --- In ydn-javascript@yahoogroups.com, Adam Moore <adamoore@...>
          wrote:
          >
          > On Tue, Dec 30, 2008 at 10:00:29PM -0000, zaneta25 wrote:
          > > I have to regularely call YAHOO.util.Get.script() to retrieve a
          > > script (every 2 seconds). The code (part of an object) is given
          below:
          > >
          > > this.queryDeviceInfo = function(){
          > > var sUrl = "http://192.168.1.115" +
          > > "/query_device_info.js?" +
          > > "callback=GSW.MonView.Monitoring.Basic.JSONCallbackDeviceInfo";
          > >
          > > sUrl += ('&requestId=' + (new Date()).getTime());
          > > YAHOO.util.Get.script(sUrl,
          > > {
          > > onFailure:function()
          > > {setTimeout(GSW.MonView.Monitoring.Basic.queryDeviceInfo, 2000);},
          > > onTimeout:function()
          > > {setTimeout(GSW.MonView.Monitoring.Basic.queryDeviceInfo, 2000);},
          > > timeout: 5000
          > > });
          > > };
          > >
          > > this.JSONCallbackDeviceInfo = function(info){
          > > setTimeout
          > > (GSW.MonView.Monitoring.Basic.queryDeviceInfo, 2000);
          > > };
          > >
          > > The script returns an object wrapped inside the call to my
          callback
          > > function GSW.MonView.Monitoring.Basic.JSONCallbackDeviceInfo. The
          > > callback processes the data returned (this part removed for
          memory
          > > leak testing) and sets up a timeout to call
          > > GSW.MonView.Monitoring.Basic.queryDeviceInfo again and so on.
          > > Everything works fine with the exception of a serious memory leak
          > > developed over time.
          > >
          > > Any ideas? I have checked that inserted scripts are correctly
          purged
          > > from the head of the document. I would really like to hear from
          > > someone who knows what is wrong here.
          >
          > What version of YUI are you using? An IE memory leak was fixed in
          > 2.6.0. If you are using the latest and believe you have found a
          memory
          > leak caused by YUI, please file a bug report:
          >
          > http://sourceforge.net/tracker/?group_id=165715&atid=836476
          >
          > -Adam
          >
          I use 2.6.0, downloaded on 11/27/2008.
        Your message has been successfully submitted and would be delivered to recipients shortly.