free memory script