H
hapa
Hello,
does the following bear any risk for memory problems?
We are using a construct like the following:
std::vector<data*> *m_vecData[1000][1000]; //array of ptrs to vector
later there will be a memory allocation for some pointers out of array via:
if(condition ==true)
{
m_vecData[?][?] = new std::vector<data*>;
m_vecData1[?][?]->reserve(2000);
}
when finished then:
if( m_vecData1[?][?] !=NULL )
delete m_vecData1[?][?];
While debugging no memory leaks are produced, but randomly the
"reserve(2000)" will not be done correctly or the "new" command failes and
crashes the application.
Thanks for advice!
Hapa
does the following bear any risk for memory problems?
We are using a construct like the following:
std::vector<data*> *m_vecData[1000][1000]; //array of ptrs to vector
later there will be a memory allocation for some pointers out of array via:
if(condition ==true)
{
m_vecData[?][?] = new std::vector<data*>;
m_vecData1[?][?]->reserve(2000);
}
when finished then:
if( m_vecData1[?][?] !=NULL )
delete m_vecData1[?][?];
While debugging no memory leaks are produced, but randomly the
"reserve(2000)" will not be done correctly or the "new" command failes and
crashes the application.
Thanks for advice!
Hapa