Hi Sergey,
I started using EurekaLog to track down exceptions and found that on program close there is an issue inside SRVTabSet.pas
I think that in this code:
destructor TSRVTabSet.Destroy;
begin
FTabs.Free;
FCloseButton.Free;
FMargins.Free;
Buffer.Free;
SkinManager := nil;
ImageList := nil;
inherited;
end;
FTabs is freed first but at some point after that GetShowTabCount is called and causes an exception.
I changed it to:
destructor TSRVTabSet.Destroy;
begin
FCloseButton.Free;
FMargins.Free;
Buffer.Free;
SkinManager := nil;
ImageList := nil;
FTabs.Free; // moved here
inherited;
end;
and the issue is now gone.
Maybe I am wrong but you may want to have a look.
All the best,
Romeo
OnDestroy order inside SRVTabSet.pas
-
- Posts: 6
- Joined: Tue Jul 15, 2008 10:47 pm
- Location: Guelph, Ontario, Canada
-
- Site Admin
- Posts: 17553
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: OnDestroy order inside SRVTabSet.pas
Yes, this is a bug, move ImageList := nil; to the beginning of the destructor.