3 Replies Latest reply on Jun 23, 2011 12:31 PM by jordana309-36

    VideoDisplay leak

    hbllproductionunit Level 1

      I have a kiosk program that loads multiple videos on top of each other via user command, or when one of the videos ends. I have a single VideoDisplay object that takes all the videos without problem and plays them. However, each time it loads another video, I love around 200MB of RAM that never comes back.


      I'm setting the video by windowWithVideoDisplayObject.videoDisplayObject.source = "new/video/path.ext" then calling play(). Is there something I can do to prevent this leak? Becuase it lasts about 30 minutes before the computer runs out of RAM and crashes, which is obviously a fail-stop for my project...it needs to run all day, from 6.30AM-11PM, after which is it shut down, and starts back up the next day. So, I don't need a totally lossless option, just one that loses a LOT less.

        • 1. Re: VideoDisplay leak
          hbllproductionunit Level 1

          Anybody? Would it just be best for me to load each video into a stream, and push that through to the video object? I really don't understand how to do video stuff in Flash, so any generals on the process it goes through to play a video would be appreciated.

          • 2. Re: VideoDisplay leak
            hbllproductionunit Level 1

            So, I've tried to use videoObject.clear(), to no avail. Is there any way to see what object exactly is sucking extra memory? Perhaps I'm attacking video object for no reason...


            EDIT: No, I set the path for the two videos I'm working with to both be the same video file, and then testing switching between the screen saver and the normal video, so that all my other code would run, but not load a new videoObject. It turns out that I notice a small leak (about 5 MB each time I would go from the screen saver to the production move and back--even though they are technically the same video, it would still clear the video object ( via videoObject.clear() ) and load it again, but because it wasn't any different, I didn't lose anything. Is there any way it's caching? Can I stop that from happening?

            • 3. Re: VideoDisplay leak
              jordana309-36 Level 1

              I have figured it out!


              When you switch in and out large video files, it would appear that the garbage collection doen't actually clear it up, becuase it is never triggered, and before it cleans up after the videoDisplay, I'm already out of memory!


              So, here's a fix that works: create a Video object, and attach a NetStream to it. Manually reset the NetStream each time you need to change something. I will post the actual code on my other post on this same issue. Hope it proves helpful to somebody at sometime! I would love just a note if it actually did prove helpful to anybody via PM on Adobe.


              The other post: http://forums.adobe.com/thread/856919

              1 person found this helpful