We have a function that, when tested using MS VC++ 2008 using omniorb CORBA libraries causes an orphaned iterator error. If we recompile all of our source using the _HAS_ITERATOR_DEBUGGING=0, the error goes away.
I cannot paste the exact code, but here is a facsimile:
void funtion(CORBA::ANY& blah)
{
sometype::iterator itr;
try
{
itr = getAcoolIterator();
...
}
catch(...)
{
...
throw CF::SomeCorbaException();
}
}
When we run the test that causes the "throw CF::SomeCorbaException();", after the whole app runs to completion we end up with a CRT exception due to an orphaned iterator. This goes away whey we ditch MS VC++ debug iterators. How can an exception cause itr to not be properly destructed?
H