Error


Code:
An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in IsoModuleTest.exe 

Additional information: External component has thrown an exception.
result in mlock.c

Code:
void __cdecl _unlock ( 
        int locknum 
        ) 
{ 
        /* 
         * leave the critical section. 
         */ 
        LeaveCriticalSection( _locktable[locknum].lock ); 
} <------
It seems I have an thread error (but I don't use threads in my code) !
(additional info: managed C++ in the GUI, in all other classes ISO C++)


If I activate debug->Exceptions C++ and CLR Exceptions :

Code:
Microsoft C++ exception: std::bad_alloc at memory location 0x0015e20c..
new() can't allocate enough memory (in this case std::vector)


---> following usage:

Code:
Class A 

in h: vector<int> *testVector; 

ClassA::ClassA() 
{ 
    testVector = new std::vector<int>(); 
    ... 
} 

ClassA::DoSomething() 
{ 
    ClassB *classB = new ClassB(testVector); 

} 

Class B 

in h: vector<int> *testVectorB; 

ClassB::ClassB(vector<int> *testVector) 
{ 
    testVectorB = testVector; 
    ... 
}

I don't understand this weird error !

It would be very nice if someone can help me !?


greets leon22