Flash Memory Usage

Well I got two questions here about memory usage of flash programs.

I made a flash game and when I play it the memory usage looks normal but if I leave it running for a long time it seems to just keep going up and up.

And the weird thing is that when I minimize it the memory usage will go back down low and I restore it and continue playing the usage will still be low. But if I just leave it for a long time it’ll just take up a lot of memory.

What is done during this time is just a single frame playing over and over with an onEnterFrame used to detect a key pressed on the keyboard and an image that scrolls across the screen by continuously changing _y parameter and then going back to the top after reaching the end and repeats.

So would it be a memory leakage somewhere? When I use something like this:
if (Key.isDown(69)) {
count = 1;
for (i in _root) {
trace(count+". _root."+i+" = “+_root*);
count++;
}
trace(”
");
}

it shows me that I’m not creating more objects and whatnot so it’s not because of that I think.

NEW: Oh, what was moving across the screen was actually a movie clip containing many water drops simulating a raining effect. I took that out and everything is fine in terms of memory usage now so far.

So how can I fix this? I want to have dynamically dropping raindrops but I don’t seem like I can do this. What I currently have is a movie clip containing two layers of rain. One that has _y increasing faster and one with _y increasing slower. So when it reaches a certain point I set _y to the top of the stage so it loops infinitely.

  1. In general how can I reduce memory and CPU usage?

thanks