title: What is a good way to compare 2 interfaces (IControl)? Is this a bug in Delphi?
body: <p>In the source code of Delphi, I see this in the <code>FMX.Forms</code> unit:</p>
  <pre><code>procedure TCommonCustomForm.SetHovered(const Value: IControl);
  begin
    if (Value &lt;&gt; FHovered) then
    begin
      ....
    end;
  end;
  </code></pre>
  <p>I think doing <code>Value &lt;&gt; FHovered</code> <strong>is fundamentally wrong</strong> because <code>Value &lt;&gt; FHovered</code> can return true and at the same time both <code>Value</code> and <code>FHovered</code> can point to the same <code>TControl</code> object. Am I wrong? (note this is what I saw in debugging).</p>
  <p>Now a subsidiary question: why can 2 <code>IControl</code> interfaces be different (from the view of pointers) but point to the same <code>TControl</code>?</p>
  <p>Note: below a sample that show how 2 <code>IControl</code> can be different (from the pointer view) and still pointing to the same object:</p>
  <pre><code>procedure TForm.Button1Click(Sender: TObject);
  var LFrame: Tframe;
      Lcontrol: Tcontrol;
      LIcontrol1: Icontrol;
      LIcontrol2: Icontrol;
  begin
    Lframe := Tframe.Create(nil);
    Lcontrol := Lframe;
    LIcontrol1 := Lframe;
    LIcontrol2 := Lcontrol;
    if LIcontrol1 &lt;&gt; LIcontrol2 then
      raise Exception.Create('Boom');
  end;
  </code></pre>
  <p>Now also what could be the good way to fix this bug ?</p>