Wednesday, February 17, 2010

Flash memory leak?

Coming in this morning I noted one of the computers running very slowly, an examination led me to the browser Opera which had been left running, but not displaying, a couple of Flash only sites. Task manager showed me that memory use was about 300Mb higher than it should be and was still increasing until I managed to close those tabs.

I've noticed it before when Flash sites are left open, but then again some don't. Now I say memory leak, but it's also possible it's down to bad programming. Let's say I want a simple two-photo slideshow; I load in the first picture, then the second. Then I want the first displayed again. Logically I've already loaded it so I just tell it to show again, now not knowing much about ActionScript there may be a way of accidentally making the programme load the first photo again. So rather than have two photos in memory I now have three, two being duplicates. Then of course I have four, five, six and so on until the system runs out of memory and falls over. In other words in a similar way as continuous adding to an array in Javascript rather than replacing the contents.

Or it may be a real memory leak, I don't know. Anyway standard advice don't leave Flash heavy sites open for any long period of time. Well actually try to avoid Flash at all which is fair easy said than done with so many opting for Flash-only pages.

0 comments: