程序动态创建的一系列的控件,
....
         Desk_Page:=TSeCustomTabSheet.Create(self);
         Desk_Page.Parent:=Desktop_Page;
         Desk_Page.Caption:=Dname;
         Desk_Page.PageIndex:=i;
         Desk_Page.PageVisible:=true;
         Desktop_Page.AddPage(Desk_Page);         Img_Box:=TSeSkinScrollBox.Create(self);
         Img_Box.Parent:=Desk_Page;
         Img_Box.SkinEngine:=SeSkinEngine1;
         Img_Box.Align:=alClient;
         Img_Box.AutoScroll:=true;
         Img_Box.VertScrollBar.Position:=0;
         Img_Box.HorzScrollBar.Position:=0;
         Img_Box.DoubleBuffered:=true;
         Img_Box.Visible:=true;         img_Panel:=TSeSkinPanel.Create(self);
         img_Panel.Parent:=Img_Box;
         img_Panel.SkinEngine:=SeSkinEngine1;
         img_Panel.BevelWidth:=0;
         img_Panel.BorderWidth:=0;
         img_Panel.ShowBevel:=false;
         img_Panel.ShowButton:=false;
         img_Panel.ShowCaption:=false;
         img_Panel.DoubleBuffered:=true;
         img_Panel.Visible:=true;....
在程序退出时提示异常:Project xxxx raised exception class Eaccessvoilation with message 'Access voilation at address 00000000 read address of 00000000'.Process stopped.  Use Step or Run to continue.有谁遇到过?到底是怎么回事?

解决方案 »

  1.   

    TO GARNETT2183(極品狼王) 
    在程序关闭时,已经确定被释放了的。
      

  2.   

    你创建后,释放不对, 造成二次释放,所以出错,修改你的源码,将
    Create(self);
    改成
    Create(nil);
      

  3.   

    TO aiirii(ari-http://spaces.msn.com/members/aiirii/) 
      我按你的意思改了,问题依然存在,同样提示:
    Project xxxx raised exception class Eaccessvoilation with message 'Access voilation at address 00000000 read address of 00000000'.Process stopped.  Use Step or Run to continue.
      

  4.   

    TO  aiirii(ari-http://spaces.msn.com/members/aiirii/) 
    你的方法是对的,确实是造成二次释放了。我将原来的自己写的控件释放过程去掉,就行了。谢谢