title: Visual C++ 2010 / QT : Why assignment operator of the class was called?
body: <p>I am working on a ApxTrace class written by an ex-colleague</p>
  
  <p>External class will call <code>copyTrace()</code> public member function to duplicate a ApxTrace class. 
  ApxTrace class contains <code>QVector</code> data member</p>
  
  <p>Here is the code: </p>
  
  <pre><code>void ApxTrace::copyTrace(ApxTrace&amp; trace)
  {
      *this = trace;
  }
  </code></pre>
  
  <p>However it gave unhandled exception (QTCored4.dll): Access violation writing location 0xfeeeefeee in the debug version of the software. Interestingly to note is that code is working well and properly in the release version of the software. </p>
  
  <p>The callStack shows that <code>ApxTrace::operator=(const APxTrace &amp;_that)</code> is called, however, the ApxTrace class does not support assignment operator.</p>
  
  <p>Please advice:</p>
  
  <ol>
  <li>Why the assignment operator is called in this case ? </li>
  <li>Comment on the <code>CopyTrace()</code> above ? I understand self assignment is not handled here.</li>
  <li>Why it is working well in the release version of the software?</li>
  </ol>