Delphi-converter: Fixed mem leaks

git-svn-id: trunk@25084 -
This commit is contained in:
martin 2010-04-30 23:49:25 +00:00
parent 008ae9167f
commit 720381e689

View File

@ -825,6 +825,7 @@ begin
fAllMissingUnits.Free; fAllMissingUnits.Free;
fCachedRealUnitNames.Free; fCachedRealUnitNames.Free;
fCachedUnitNames.Free; fCachedUnitNames.Free;
FreeAndNil(fSettings);
inherited Destroy; inherited Destroy;
end; end;
@ -1143,6 +1144,7 @@ var
PasFile, RelPath, SubPath, sUnitName: String; PasFile, RelPath, SubPath, sUnitName: String;
begin begin
PasFileList:=FindAllFiles(APath,'*.pas',true); PasFileList:=FindAllFiles(APath,'*.pas',true);
try
for i:=0 to PasFileList.Count-1 do begin for i:=0 to PasFileList.Count-1 do begin
PasFile:=PasFileList[i]; PasFile:=PasFileList[i];
RelPath:=FileUtil.CreateRelativePath(PasFile, ABasePath); RelPath:=FileUtil.CreateRelativePath(PasFile, ABasePath);
@ -1155,6 +1157,9 @@ begin
fCachedRealUnitNames[UpperCase(sUnitName)]:=sUnitName; fCachedRealUnitNames[UpperCase(sUnitName)]:=sUnitName;
end; end;
end; end;
finally
PasFileList.Free;
end;
end; end;
procedure TConvertDelphiPBase.CacheUnitsInPath(const APath: string); procedure TConvertDelphiPBase.CacheUnitsInPath(const APath: string);