fixed memleak

git-svn-id: trunk@7112 -
This commit is contained in:
vincents 2005-04-28 11:50:56 +00:00
parent 96e2620223
commit 27c61a0405
2 changed files with 4 additions and 10 deletions

View File

@ -531,16 +531,15 @@ Var
begin begin
FRecent.Clear; FRecent.Clear;
With TInifile.Create(GetoptionFileName) do With TInifile.Create(GetoptionFileName) do begin
begin
Count:=ReadInteger('Recent','Count',0); Count:=ReadInteger('Recent','Count',0);
For I:=1 to Count do For I:=1 to Count do begin
begin
S:=ReadString('Recent','File'+IntToStr(i),''); S:=ReadString('Recent','File'+IntToStr(i),'');
If S<>'' then If S<>'' then
FRecent.Add(S); FRecent.Add(S);
end;
end; end;
Free;
end;
BuildReopenList; BuildReopenList;
end; end;

View File

@ -195,7 +195,6 @@ end;
procedure TCustomPackageEditor.SetCurrentModule(Value: TDomElement); procedure TCustomPackageEditor.SetCurrentModule(Value: TDomElement);
begin begin
//matthijs 10-4-2005 19:16 added checks on Value and Value.ParentNode
if (Value <> nil) then begin if (Value <> nil) then begin
if (Value.ParentNode <> nil) then begin if (Value.ParentNode <> nil) then begin
CurrentPackage:=Value.ParentNode as TDomElement; CurrentPackage:=Value.ParentNode as TDomElement;
@ -873,9 +872,6 @@ begin
P:=FModuleNode; P:=FModuleNode;
Result:=SubNodeWithElement(P,E); Result:=SubNodeWithElement(P,E);
end; end;
//matthijs 10-4-2005 19:22 Made next two lines comments.
// If (Result=Nil) then
// Raise Exception.CreateFmt(SErrNoNodeForElement,[E['name']]);
end; end;
Procedure TPackageEditor.AddElement(E : TDomElement); Procedure TPackageEditor.AddElement(E : TDomElement);
@ -969,7 +965,6 @@ end;
Procedure TPackageEditor.SetCurrentElement(E : TDomElement); Procedure TPackageEditor.SetCurrentElement(E : TDomElement);
begin begin
//matthijs 10-4-2005 19:27 Added Check on E = nil.
If (E<>FCurrentElement) and (E <> nil) then If (E<>FCurrentElement) and (E <> nil) then
begin begin
Inherited; Inherited;