首页 > TAG信息列表 > FreeAndNil

SysUtils-Function

SysUtils-Function SysUtils.Abort SysUtils.AddExitProc SysUtils.AddTerminateProc SysUtils.AdjustLineBreaks SysUtils.AnsiCompareFileName SysUtils.AnsiCompareStr SysUtils.AnsiCompareText SysUtils.AnsiDequotedStr SysUtils.AnsiExtractQuotedStr SysUtils.Ans

数据库图片存取(New)

procedure TForm1.Button1Click(Sender: TObject); var ms : TMemoryStream; jpeg1 : TJPEGImage; begin //将数据库字段的内容读取到流中 ms := TMemoryStream.Create; TBlobField(qrM.FieldByName('IMAGE')).SaveToStream(ms); //从流中加载图片 jpeg1 := TJPEGI

delphi save .dfm to .txt

procedure TForm2.saveDfm; var inStream,outStream:TMemoryStream; begin inStream:=TMemoryStream.Create; outStream:=TMemoryStream.Create; try inStream.WriteComponent(self); inStream.Position:=0; ObjectBinaryToText(inStream,outStr

[原创]Delphi FreeAndNil 是一个过程,并不是函数

 Delphi FreeAndNil 是一个过程,并不是函数,看源代码就知道,它的主要作用是清空并释放对象 procedure FreeAndNil(var Obj);var Temp: TObject;begin Temp := TObject(Obj); Pointer(Obj) := nil; Temp.Free;end; 看代码的执行顺序,先置空,再释放 置空  清空指针指向内存的地址