summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-08 16:28:52 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-08 16:28:52 +0200
commit79bbdf5ee16b72e01f683ecc25ba3f0e069a21a1 (patch)
tree6d2b5506ac801d1a30e971fa3f2da5c2019ddb51 /src
parent1d2d738c22acc3d402c71f4574861a57be4e0a25 (diff)
downloadfpGUI-79bbdf5ee16b72e01f683ecc25ba3f0e069a21a1.tar.xz
Finally fixed that memory leak and removed the array requirement.
Signed-off-by: Graeme Geldenhuys <graeme@mastermaths.co.za>
Diffstat (limited to 'src')
-rw-r--r--src/HelpFile.pas28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/HelpFile.pas b/src/HelpFile.pas
index 5a9479c8..b38e1972 100644
--- a/src/HelpFile.pas
+++ b/src/HelpFile.pas
@@ -221,15 +221,11 @@ var
Topic: TTopic;
EntryIndex: longint;
pEntry: pTTOCEntryStart;
- tocarray: array of Int32;
+ tocarray: ^Int32;
p: PByte;
begin
_Topics.Capacity := _Header.ntoc;
-
-//--------------------------------- experimental >>
- SetLength(tocarray, _Header.ntoc);
p := _Data + _Header.tocoffsetsstart;
-
Move(p, tocarray, SizeOf(tocarray));
for EntryIndex := 0 to _Header.ntoc-1 do
begin
@@ -242,28 +238,6 @@ begin
Topic.Index := EntryIndex;
_Topics.Add(Topic);
end;
- SetLength(tocarray, 0);
- exit;
-//----------------------------------
-
- //pEntry:= _Data + _Header.tocstart;
-
-//writeln('----------- old method ');
- //for EntryIndex := 0 to _Header.ntoc-1 do
- //begin
- //Topic:= TTopic.Create( _Data,
- //_Header,
- //_Dictionary,
- //pEntry );
-
- //Topic.HelpFile := Self;
- //Topic.Index := EntryIndex;
-
- //_Topics.Add( Topic );
-
- //inc( pEntry, pEntry^.Length );
- //writeln('Topic ' + IntToStr(EntryIndex) + ' length = ' + IntToStr(pEntry^.Length));
- //end;
end;
procedure THelpFile.ReadDictionary;