summaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-10-24 15:36:34 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-10-24 15:36:34 +0000
commitc318d5f4b24ba70bce05fa5aaf828a27eca719d1 (patch)
tree24a53879fe4884005f2ae91c6760bf8fc39f16e3 /ide
parent64516c31da65832fd77761a613fecf0326587619 (diff)
downloadfpc-c318d5f4b24ba70bce05fa5aaf828a27eca719d1.tar.gz
* memleak in chm support fixed, added some comments
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11969 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'ide')
-rw-r--r--ide/wchmhwrap.pas2
-rw-r--r--ide/whtmlhlp.pas5
2 files changed, 4 insertions, 3 deletions
diff --git a/ide/wchmhwrap.pas b/ide/wchmhwrap.pas
index ca05dde21d..a43fe6bfa0 100644
--- a/ide/wchmhwrap.pas
+++ b/ide/wchmhwrap.pas
@@ -69,7 +69,7 @@ Constructor TChmWrapper.Create(name:string);
begin
ffs:=Classes.TFileStream.create(name,fmOpenRead);
- fchmr:=TChmReader.Create(ffs,True);
+ fchmr:=TChmReader.Create(ffs,True); // owns ffs
findex:=nil;
if not fchmr.isvalidfile then
begin
diff --git a/ide/whtmlhlp.pas b/ide/whtmlhlp.pas
index 0b15e8906c..d0325c2287 100644
--- a/ide/whtmlhlp.pas
+++ b/ide/whtmlhlp.pas
@@ -1577,8 +1577,9 @@ end;
constructor TChmHelpFile.Init(AFileName: string; AID: word);
begin
- if inherited Init(AID)=false then Fail;
- renderer^.done;
+ if inherited Init(AID)=false then
+ Fail;
+ Dispose(renderer,done);
renderer:=New(PCHMTopicRenderer, Init);
DefaultFileName:=AFileName;
if (DefaultFileName='') or not ExistsFile(DefaultFilename) then