title: OleVariant in Delphi Copy by value or References?
body: <p>I have a code like this:</p>
  
  <pre><code>function Test: OleVariant;
  var
     r: OleVariant;
  begin
     r := VarArrayCreate([0, 100], varVariant);
     // some other code goes here
     Result := r; // does this perform deep or shadow copy?
  end;
  </code></pre>
  
  <p>So the question is, for OleVariant types,  the assignment operation copies the value or reference?</p>
  
  <p>Does it depend on the OleVariant types? </p>