0 Replies Latest reply on Dec 15, 2013 6:38 PM by lcrits

    URLStream.readBytes always throw out of memory exception (errorID=1000)


      When I try to load a file as 180MBytes by using URLStream.readBytes(). 


      In some PCs, it's OK.

      But in some PCs, there are always [out of memory] exception (errorID=1000) even such PC still had enough memory.


      For example:

         Total memory is 2G, current used is 1.43G, but URLStream.readBytes() still throw such exception.

      For file with little size such as 30M, there isn't such problem.


      Could any body give some suggestion?

      Best regards,


      Sourcecode is very simple like:

        var myStream:URLStream;

        var inputBytes: ByteArray = new ByteArray();

        ... do load ...

        // load by progressive event. I only deal progress load once, and ignore all later progressive load events.

        // for example first 500KBytes was read.


        // load again when all datas is loaded completely. For example, 180MBytes should be read.

        try {


        }  catch(e:*) {

          // warning log