anchor.diff:  
   function TStringCache.Get(const ID: TStringId): string;
   begin
  -  if ID < FIdToString.Count then
  -    Exit(FIdToString[ID].Value)
  -  else
  -    raise Exception.Create(Format('String cache entry with ID %d does not exist', [ID]));
  -end;
  -
  -procedure TStringCache.Clear;
  +  Lock;
  +  try
  +    if ID < FIdToString.Count then
  +      Exit(FIdToString[ID].Value)
  +    else
  +      raise Exception.Create(Format('String cache entry with ID %d does not exist', [ID]));
  +  finally
  +    Unlock;
  +  end;
  +end;
  +
  +procedure TStringCache.Clear(const OnDestruction : Boolean);
   var
     I : Integer;
   begin
  +  // This doesn't need a lock. When threadsafe, never cleared except on destruction
  +
     if FRefCount <> 0 then
       raise Exception.Create(Format('Clearing the string cache while objects still rely on it (%d)', [FRefCount]));
   
  
positive.code: destructor TStringCache.Destroy;
  begin
    assert(FRefCount = 0, 'String cache destroyed with live objects still relying on it');
    Clear;
    FStringToId.Free;
    FIdToString.Free;
    inherited;
  end;
  
  
negative.code:     function Add(const Value : string) : TStringId;
      function AddAndGet(const P : PChar; const Length : Integer) : string;
      function Get(const ID : TStringId) : string;
      procedure Clear(const OnDestruction : Boolean = false);
      procedure ByUsage(InOrder : TList<TStringRec>);
  
      procedure IncRef;
      procedure DecRef;
  
      property Persistent : Boolean read GetIsPersistent write SetIsPersistent;
      class property Instance : TStringCache read FInstance;
    end;
  
  