Bitmapdata.lock() not working?

I’m messing around with bitmaps, and the lock() function seems to do absolutely nothing, though i might be using it wrong; here’s bit of test code i made to try it out:


var bitmapData:BitmapData=new BitmapData(400,400,true,0x000000)
bitmapData.lock()
var i:int;
var e:int;
var lasttime:int=getTimer()
for(i=0;i<200;i++)
{
    for(e=0;e<200;e++)
    {
        bitmapData.setPixel32(i,e,0xffff0000)
    }
}   
//bitmapData.unlock()
var bitmap:Bitmap=new Bitmap(bitmapData)
addChild(bitmap)
trace(getTimer()-lasttime)

When i run that, the changes i made to the bitmapdata are still present, even though the unlock function isn’t executed. also, there is absolutely no difference in the time it takes to execute the bitmap manipulations with or without using the bitmapdata.lock() and unlock() functions. I can’t figure it out, i must be doing something wrong here, if anyone can shed some light on this i’d appreciate it, TIA