那这样可以吗?给我一个代码看看可以吗? function creatBitmap(offSet : integer):TBitmap; var tmpBitmap: TBitmap; begin ... Result := tmpBitmap; free; end;
那这样可以吗?给我一个代码看看可以吗? function creatBitmap(offSet : integer):TBitmap; var tmpBitmap: TBitmap; begin ... Result := tmpBitmap; free; end;你的这个代码Free是释放什么对象?如果是是释放tmpBitmap,你的程序就出问题了。
function creatBitmap(offSet : integer):TBitmap;
var
tmpBitmap: TBitmap;
begin
...
Result := tmpBitmap;
free;
end;
function creatBitmap(offSet : integer):TBitmap;
var
tmpBitmap: TBitmap;
begin
...
Result := tmpBitmap;
free;
end;你的这个代码Free是释放什么对象?如果是是释放tmpBitmap,你的程序就出问题了。