在Delphi关闭时要释放你所分配的内存。比如动态数组等

解决方案 »

  1.   

    你试一下在OnDestory事件中跟踪一下,看是否执行了某些代码访问已经被释放了的对象?
      

  2.   

    Snakeguo(楠--莫等闲、白了少年头,空悲切。) 
    应该怎样在OnDestory追踪阿??
      

  3.   

    access violation at 0x7851db30 read of addressw 0xeeefef6
    是你的代码访问了已经释放过的地址造成的,建议跟踪一下。
      

  4.   

    例如:
    form1.button1click(sender:object);
    begin
       try
          form2:=Tfrom2.create(nil);
          form2.showmodal;
          
       finally
          form2.free;//重复释放
       end;
    end;
    form2onclose(...);
    begin
      free;
    end;
      

  5.   

    在form2onclose(...)中應這樣寫
    form2:=nil;
    action:=cafree;
      

  6.   

    估计是在关闭中访问了已经Free的资源