title: Using XMVECTOR from DirectXMath as a class member causes a crash only in Release Mode?
body: <p>I've been trying to use XMVECTOR as a class member for a bounding box, since I do a lot of calculations, but I use the XMFLOAT3 only once per frame, so the bounding box has a method that gives me it's center in a XMFLOAT3, otherwise it stays in a XMVECTOR;The class is delcared with __declspec(align(16)) and works in debug mode.However in Release mode it crashes the instant I set it to something:</p>
  
  <pre><code>    Box&amp; Box::operator=(const Box&amp; box)
      {
          _center = box._center;
          _extents = box._extents;
          return *this;
      }
  </code></pre>
  
  <p>Whenever I do:</p>
  
  <pre><code>Box A;
  
  Box B;
  
  A = B;
  </code></pre>
  
  <p>It crashes, giving me 0xC0000005: Access violation reading location 0x00000000.
  Also it crashes when I create it as a pointer:</p>
  
  <pre><code>Box* A = new Box();
  </code></pre>
  
  <p>This is the constructor:</p>
  
  <pre><code>    Box::Box()
      {
          center = XMVectorZero();
          extents = XMVectorSplatOne();
      }
  </code></pre>
  
  <p>Again, this works fine in Debug mode, but in Release it crashes.What could Release mode be changing that would generate invalid code?Do I need to do something else, other than aligning the box to 16 bytes?</p>