fixed freeing TReader.Driver

git-svn-id: trunk@5788 -
This commit is contained in:
mattias 2004-08-15 15:05:46 +00:00
parent a6d5670154
commit 32db79433f
2 changed files with 4 additions and 3 deletions

View File

@ -1542,7 +1542,8 @@ initialization
{$IFDEF UseFCLDataModule} {$IFDEF UseFCLDataModule}
RegisterInitComponentHandler(TComponent,@InitResourceComponent); RegisterInitComponentHandler(TComponent,@InitResourceComponent);
{$ENDIF} {$ENDIF}
// keep this comment, there is parser a bug in fpc 1.0.x
// keep this comment line, there is parser a bug in fpc 1.0.x
finalization finalization
//DebugLn('forms.pp - finalization section'); //DebugLn('forms.pp - finalization section');

View File

@ -1642,7 +1642,7 @@ begin
{$IFDEF NewLRSStreamer} {$IFDEF NewLRSStreamer}
if Result.Driver.ClassType=LRSObjectReaderClass then exit; if Result.Driver.ClassType=LRSObjectReaderClass then exit;
// hack to set a write protected variable. // hack to set a write protected variable.
DestroyDriver:=true; // DestroyDriver:=true; TReader will free it
Driver:=LRSObjectReaderClass.Create(s,4096); Driver:=LRSObjectReaderClass.Create(s,4096);
p:=@Result.Driver; p:=@Result.Driver;
Result.Driver.Free; Result.Driver.Free;