procedure TForm1.BitBtn1Click(Sender: TObject);
var
N: integer;
begin
with panel1do
for N := ControlCount - 1do
wnto 0do
//一定要downto
if Controls[N] is TImage then
begin
(Controls[N] as TImage).Picture.Bitmap.FreeImage;
(Controls[N] as TImage).Free;
end;
end;