title: bad_alloc when calling new on class Texture
body: <p>This is the offending line:</p>
  
  <p><code>Texture *texture = new Texture (...);</code></p>
  
  <p>I receive from bad_alloc here:</p>
  
  <pre><code>void *__CRTDECL operator new(size_t size) _THROW1(_STD bad_alloc)
      {       // try to allocate size bytes
      void *p;
      while ((p = malloc(size)) == 0)
              if (_callnewh(size) == 0)
              {       // report no memory
              static const std::bad_alloc nomem;
              _RAISE(nomem);
              }
  
      return (p);
      }
  </code></pre>
  
  <p>size is ~28 bytes big</p>
  
  <p>and so far the program has placed maybe 2 MB on the heap in a 32bit system (fresh reboot) and before this only about twenty things get allocated on the heap so I know there's no heap corruption.</p>
  
  <p>I'm so confused...</p>