是的,内存还不会释放,你可以在onClose里面加一个
Action=caFree;解决

解决方案 »

  1.   

    onClose里面添加
    Freeandnil(form1);
      

  2.   

    使用form1.free就可以完全释放。
      

  3.   

    注意关闭后Free掉就可以了
    application.createform(tform1,form1);
    try
      form1.showmodal;
    finally
      form1.free;
    end;
      

  4.   

    应用程序自动创建的窗体,你只需close,系统会自动free
      

  5.   

    close不会对窗体进行释放操作,我觉得这样比较好 :
    begin
        if form1=nil then  application.createform(tform1,form1);
        try
            form1.showmodal;
        finally
            FreeAndNil(form1);
        end;
    end;
      

  6.   

    是的,内存还不会释放,你可以在onClose里面加一个
    Action=caFree;解决
    --------------------------------------------------------
    应用程序自动创建的窗体,你只需close,系统会自动free---------------------------------------------------------
    到底谁正确????????????????????????????
      

  7.   

    内存还不会释放,在onClose里面加一个
    Action=caFree;解决
      

  8.   

    调用form.free内存就释放了,只要是用CreateForm, TForm.Create之类手工创建的窗体,都可以用free释放