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
FRecent.Clear;
With TInifile.Create(GetoptionFileName) do
begin
With TInifile.Create(GetoptionFileName) do begin
Count:=ReadInteger('Recent','Count',0);
For I:=1 to Count do
begin
For I:=1 to Count do begin
S:=ReadString('Recent','File'+IntToStr(i),'');
If S<>'' then
FRecent.Add(S);
end;
end;
Free;
end;
BuildReopenList;
end;

View File

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