views:

225

answers:

1

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.

Edit 2: It doesn't happen if I replace the spark VideoDisplay with an mx VideoDisplay. Bug in the spark component?

A: 

I dont have a solution, but just wanted to add that I have had the same issue.

I have a 'screensaver' which just loops the same video over and over (and over...). The component is initialized (but hidden and paused) when the app starts, and comes into view when the app is idle.

Each time the video restarts, more memory is allocated even though it is the same video and only 'play' is called (the source never changes).

I think your assumption of a bug in the spark component is correct as by replacing the videodisplay with the old mx component fixed the issue.

shane
that's interesting to know. The leaking sounds even worse than mine since you're just replay the same video..
Ben