Form.Release + NIL

后端 未结 5 1277
无人及你
无人及你 2021-02-05 21:24

if Form.Release is called after using the form, it will free all related memory but not set the form variable to nil.

if not assigned (Form1) then
  begin
    Ap         


        
5条回答
  •  臣服心动
    2021-02-05 21:50

    In Delphi Win32, the appropriate way to free objects is to call

    FreeAndNil(Form1)
    

    This does both jobs in a single call.

    However, I have a sneaking feeling there's more to your question than meets the eye. Are you using Delphi for .NET - and if so, which version?

提交回复
热议问题