0 Replies Latest reply on Apr 29, 2010 5:44 AM by bencoderedit

    Binding Image to Bitmap representing NetStream

    bencoderedit Level 1

      I have a netstream playing some video.
      There is an interval taking a Bitmap.draw of that netstream's Video object and saving it in my model.

       

      I have elsewhere a Image box with its source set to the image in the model. So it shows a preview of the media when on the stage.


      There are a couple of other places that also reference that bitmap in the model. So I implemented a getter to create a copy of the object as I ran into problems getting a grey image when multiple controls were using their sources as that same object.

       

      However it doesn't appear that garbage collection is working correctly when that bitmap is updated. The functionality all works correctly, however the memore usage rockets (>300Meg within 20sec) when these images are bound to that bitmap.

       

      In the setter in the model i have tried disposing the old bitmapdata before adding the new one. (Obviously didn't work as there is a copy created for each image box)

       

      If anyone has any ideas I'd greatly appreciate them! It works fine on a half decent windows machine, the memory just peaking then dropping. Its obviously not right but it's not noticable. However on my Mac it grinds to a halt.