Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-23971

Calling several times a WebService causes memory leak.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Later
    • Adobe Flex SDK 3.4 (Release)
    • None
    • RPC: WebService
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      1.Create a simple WebService:

      <mx:WebService id="ws" wsdl="http://www.webservicex.net/barcode.asmx?wsdl" service="BarCode"
      port="BarCodeSoap" showBusyCursor="true" fault="errorWebService(event)" >
      <mx:operation name="Code39" makeObjectsBindable="false" resultFormat="e4x"
      result="getResult()" fault="errorWebService(event)">
      <mx:request xmlns="">
      <Code>1234567890123</Code>
      <BarSize>210</BarSize>
      <ShowCodeString>false</ShowCodeString>
      <Title>ASDF</Title>
      </mx:request>
      </mx:operation>
      </mx:WebService>

      2. On the getResult() function, call again the same webservice and clean the last result:
      public var max_request : int = 500;
      public var loop : Boolean = false;
      public function getResult():void

      { console.text = ws.Code39.lastResult[0]; console2.text += (System.totalMemory/(1024*1024)).toString() + ' MB\n'; max_request--; if ( max_request > 0 && loop == true) ws.Code39.send(); ws.Code39.clearResult(); }

      3. Compare on profiler the memory before calling the WebService 500 times and after that, calling the garbage collector in both cases.

      Actual Results:
      There is a memory usage difference between the first and the last call, depending on the response size. Using larger response sizes, the memory leak increases proportionality.

      Expected Results:

      There shouldn't be any memory leak between the first and the last call.
      Workaround (if any):

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: