title: _BLOCK_TYPE_IS_VALID error on boost::scoped_array
body: <p>After a huge amount of digging and searching I found the root of my problem. In essence this code is executed and, in its own project it causes the same error. I see that I cannot reset a smart pointer to a new string...but why? Also is there a simple way around this?</p>
  
  <pre><code>scoped_array&lt;char&gt; sptr;
  char* nptr = "Hello";
  
  sptr.reset("");
  sptr.reset(nptr);
  </code></pre>
  
  <p>EDIT -</p>
  
  <p>I think I've figured it out. While resetting, the smart pointer tries to delete and empty character array ("") which, because the new operator was not used, was not allocated on the heap (ahem !!?!!?!???!?!). Therefore this program will break miserably when it tries to deallocate the memory. So correct me if I'm wrong but would the string itself be stored in the program's executable byte stream itself? If so, just for future reference, is there a way to force the allocation of a new string?</p>