mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 14:54:42 +01:00
fixed memleak
git-svn-id: trunk@7112 -
This commit is contained in:
parent
96e2620223
commit
27c61a0405
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user