Problem running with the /CLR flag

  • Thread starter Thread starter theunissen
  • Start date Start date
T

theunissen

Hi,

I have a Visual C++ project (pretty large) using MFC and ATL. It was
converted from Visual C++6 to Visual C++2003, and last to Visual C+
+2005.

Today I decided to turn on the CLR support and once I turn it on and
try to run my app crashes while adding some elements to a std::vector
instance. It seems to corrupt the heap when I add a second element
when it tries to re-size the vector and delete the first element. So,
it might not be the vector itself. IT actually happens during the
initinstance of the app.

I am adding the following element to a vector:

std::vector<CMultiDocTemplate*> m_listMoreViews;

m_listMoreViews.push_back( pViewTemplate ); // pViewTemplate is of
type CMultiDocTemplate*

Any clues would be appreciated.

It works fine without the /CLR flag

Thanks in advance,

Michel
 
Back
Top