Problem running with the /CLR flag

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top