anchor.diff:  
   procedure TPCDaemonMapper.DoOnDestroy;
   begin
  +  inherited DoOnDestroy;
     If Assigned(FLog) then begin
       FLog.OnInThreadNewLog:=Nil;
       FreeAndNil(FLog);
     end;
  -  inherited DoOnDestroy;
   end;
   
   end.
  
positive.code: 
  { TPCDaemon }
  
  procedure TPCDaemon.ThreadStopped(Sender: TObject);
  begin
    FreeAndNil(FThread);
  end;
  
  function TPCDaemon.Start: Boolean;
  begin
    Result:=inherited Start;
    TLog.NewLog(ltinfo,ClassName,'Daemon Start '+BoolToStr(Result));
    FThread:=TPCDaemonThread.Create;
    FThread.OnTerminate:=@ThreadStopped;
    FThread.FreeOnTerminate:=False;
    if (Application.HasOption('b','block')) then begin
      FThread.MaxBlockToRead:=StrToInt64Def(Application.GetOptionValue('b','block'),$FFFFFFFF);
      TLog.NewLog(ltinfo,ClassName,'Max block to read: '+IntToStr(FThread.MaxBlockToRead));
    end;
    FThread.Resume;
  end;
  
  function TPCDaemon.Stop: Boolean;
  begin
    Result:=inherited Stop;
    TLog.NewLog(ltinfo,ClassName,'Daemon Stop: '+BoolToStr(Result));
    FThread.Terminate;
  end;
  
  function TPCDaemon.Pause: Boolean;
  
negative.code:   TPCDaemon = Class(TCustomDaemon)
    Private
      FThread : TPCDaemonThread;
    public
      Function Start : Boolean; override;
      Function Stop : Boolean; override;
  