Курсовая работа: Системное программирование для операционных систем
TVerDirectory::TVerDirectory(TStrings * fExNames, AnsiString fPath, TDirThread * aOwner)
{
Path=fPath;
Owner=aOwner;
DirList= new TStringList();
GlobalList = new TGlobalList(); GlobalList->Sorted=true;
NameList = new TNameList(); NameList->Sorted=true;
ExNames = new TNameList(); ExNames->Sorted=true;
ExNames->AddStrings(fExNames);
}
//---------------------------------------------------------------------------
TVerDirectory::~TVerDirectory(void)
{
Clear();
delete DirList;
delete GlobalList;
delete NameList;
delete ExNames;
}
//---------------------------------------------------------------------------
void __fastcall TVerDirectory::Clear(void)
{
for(int i=0; i<NameList->Count;i++) delete NameList->At(i);
for(int i=0; i<ExNames->Count;i++)
if (ExNames->At(i) != NULL)
{
delete ExNames->At(i);
ExNames->Objects[i]=NULL;
}