I have a QList<float**>. I first iterate on elements to work with them:
for( int i = 0 ; i < nb ; i++ )
{
float** data1 = data_list.at( i ) ;
float** data2 = data_list.at( i + 1 ) ;
// do things with data1 and data2
}
What happens if I delete[] in a C-stylish manner data1 and data2 inside this loop? Are elements at position i and i+1 in data_list destroyed as well (so that i cannot access them anymore) ?
it is a list of
float**. Thefloat*they are pointing to are not in the list.which means if you use
delete[], the memory is released, butdata_listitself doesnt change. After this point they will be invalid pointers.