var 
    AForm:TMyForm; 
..... 
begin         AForm:=TMyForm.create(Application); 
        AForm.Show 。。
end;Form的Close事件中,已经写了Action := caFree;
是否别的地方还需要Free?

解决方案 »

  1.   

    AForm:=TMyForm.create(nil);  
      AForm.Show  Create参数使用nil,除了close事件中,Action := caFree,还需要在别的地方free吗?欢迎各位朋友探讨
      

  2.   

    不需要在别的地方free。
    如果没有写Action := caFree; 而:
    AForm:=TMyForm.create(父窗体句柄);   
      AForm.Show   
    也不需要在别的地方free。AForm 会随父窗体释放而自动释放。
      

  3.   

    不用再Free
    在onDestroy事件写上AForm:=nil;
      

  4.   


    action:=cafree;
     T(sender):=nil;