anchor.diff:  
   implementation
   uses
  -  SysUtils, Classes;
  +  SysUtils, Classes, KM_CommonUtils;
   
   { TKMSavedReplays }
   constructor TKMSavePointCollection.Create();
   begin
     inherited;
   
  -  fCriticalSection := TCriticalSection.Create;
  +  fSaveCS := TCriticalSection.Create;
  +  fWaitCS := TCriticalSection.Create;
     fSavePoints := TDictionary<Cardinal, TKMSavePoint>.Create();
     fLastTick := 0;
   end;
  
positive.code: begin
    if Self = nil then Exit;
  
    fCriticalSection.Enter;
  end;
  
  
  
negative.code: 
  destructor TKMSavePointCollection.Destroy();
  begin
    {$IFDEF WDC}
    // Wait till all threads release waitLock
    while True do
    begin
      fWaitCS.Enter;
      try
        if fAsyncSaveThreadsCnt = 0 then
          Break;
      finally
        fWaitCS.Leave;
      end;
      Sleep(100);
    end;
    {$ENDIF}
  
    Lock; // Lock even in destructor
    try
      Clear;
      fSavePoints.Free; // TKMList will free all objects of the list
    finally
      Unlock;
    end;
    fSaveCS.Free;
    fWaitCS.Free;
  
    inherited;
  end;
  