Removing Images from Memory in a loop

Hiya everybody.

Friday eve nightmare hehe. I’ve made a script which loads in, at intervals, images in a sequence (image1.jpg, image2.jpg,… ). However I’ve being doing my nut as to how to remove the preceeding image from memory as looking a the Windows Task Manager, each image gets added again and again, accumulating memory usage.

I’ve tried removeChild, and null; stuff, but to no avail.

I want it to go through the 10 images, and with each step to the next image, remove the last one from memory. Make sense?

Or if you have any ideas of a better way of doing this?

Script is below.

Thanks for reading, have a good weekend

:samus_v2:


stop();
var j:int = 0;
var mLoader:Loader = new Loader();
function PicLoad(i:int)
{

var mRequest:URLRequest = new URLRequest(“folder/image”+i+".jpg");
mLoader.load(mRequest);
addChild(mLoader);

}
var timer:Timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
function onTimer(evt:TimerEvent):void {

if(j>9){j=1;

}
else{

j++
};
PicLoad(j);
};