mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 21:30:23 +02:00
* fix memory leaks
This commit is contained in:
parent
521b7cfa3b
commit
ec4465234c
@ -512,6 +512,7 @@ begin
|
|||||||
// comment at the beginning of the ini file
|
// comment at the beginning of the ini file
|
||||||
oSection := TIniFileSection.Create(sLine);
|
oSection := TIniFileSection.Create(sLine);
|
||||||
FSectionList.Add(oSection);
|
FSectionList.Add(oSection);
|
||||||
|
continue;
|
||||||
end;
|
end;
|
||||||
if (Copy(sLine, 1, 1) = Brackets[0]) and (Copy(sLine, length(sLine), 1) = Brackets[1]) then begin
|
if (Copy(sLine, 1, 1) = Brackets[0]) and (Copy(sLine, length(sLine), 1) = Brackets[1]) then begin
|
||||||
// regular section
|
// regular section
|
||||||
@ -670,10 +671,10 @@ var
|
|||||||
begin
|
begin
|
||||||
oSection := FSectionList.SectionByName(Section);
|
oSection := FSectionList.SectionByName(Section);
|
||||||
if oSection <> nil then begin
|
if oSection <> nil then begin
|
||||||
oSection.Free;
|
|
||||||
{ It is needed so UpdateFile doesn't find a defunct section }
|
{ It is needed so UpdateFile doesn't find a defunct section }
|
||||||
{ and cause the program to crash }
|
{ and cause the program to crash }
|
||||||
FSectionList.Delete(FSectionList.IndexOf(oSection));
|
FSectionList.Delete(FSectionList.IndexOf(oSection));
|
||||||
|
oSection.Free;
|
||||||
UpdateFile;
|
UpdateFile;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -790,7 +791,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2005-02-14 17:13:15 peter
|
Revision 1.9 2005-04-05 21:08:08 peter
|
||||||
|
* fix memory leaks
|
||||||
|
|
||||||
|
Revision 1.8 2005/02/14 17:13:15 peter
|
||||||
* truncate log
|
* truncate log
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user