Flex 4 Spark VideoDisplay in Popup causes memory leak
        Posted  
        
            by Ben
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ben
        
        
        
        Published on 2010-06-03T00:43:37Z
        Indexed on 
            2010/06/03
            0:54 UTC
        
        
        Read the original article
        Hit count: 575
        
Hi,
I'm currently building an air app with FB 4.
I have a custom control that contains a VideoDisplay control, and which loaded using the PopupManager.
Using the profiler, i've noticed that every time the my popup is loaded the memory for it gets allocated, but when it's closed the memory is never recovered.
There's nothing else holding a reference to the popup. And if I don't set the source of the VideoDisplay object, then there is no leak - but as soon as the source is set I get a leak.
I can't see any method to force close the stream or anything on the spark VideoDisplay control.
Any idea or suggestions?
EDIT: I have tried setting the source to null before closing the popup but that doesn't change anything.
Also, I'm not holding any event listener to the video
© Stack Overflow or respective owner