title: CrtIsValidHeapPointer problem with Oracle OCCI MetaData::getString
body: <p>I am trying to get a name of a column from an oracle table using the MetaData class.  I get a vector of MetaData objects from the ResultSet and then I loop over them executing the getString() function on each item, the problem is that on the second iteration, when exiting the loop to start a new iteration, it crashes on gives me CrtIsValidHeapPointer Assertion.</p>
  
  <pre><code>  /*
           * If this ASSERT fails, a bad pointer has been passed in. It may be
           * totally bogus, or it may have been allocated from another heap.
           * The pointer MUST come from the 'local' heap.
           */
          _ASSERTE(_CrtIsValidHeapPointer(pUserData));
  </code></pre>
  
  <p>The data being pointed to by pUserData is actually valid, so I suspect my heap from the external API DLL is not the same as the CRT heap, the question is how do I resolve this issue?</p>
  
  <p>my code:</p>
  
  <pre><code> std::vector&lt;oracle::occi::MetaData&gt; data = res-&gt;getColumnListMetaData();
  
           for (std::vector&lt;oracle::occi::MetaData&gt;::iterator iter = data.begin(); iter != data.end(); iter++)
           {
              //Crash on second iteration after this statement
               std::string s = (iter-&gt;getString(oracle::occi::MetaData::ATTR_NAME));
  
               int i = iter-&gt;getInt(oracle::occi::MetaData::ATTR_DATA_TYPE);
               std::cout &lt;&lt; i &lt;&lt; std::endl;
           }
  </code></pre>
  
  <p>Does anybody have any suggestions or has anybody had this problem and solved it?</p>
  
  <p>OS = Windows, VS2008, Oracle 11.2</p>