コード内の行列に割り当てられたメモリを解放しようとすると、問題が発生します。私はこの機能を使用しています:
void free_matrix(float **m, int row)
{
for( int i=0; i<row; i++ )
{
free( m[i]);
}
free(m);
}
しかし、なぜ機能しないのかわかりません。次のエラーが表示されます。
Windows has triggered a breakpoint in mycode.exe.
This may be due to a corruption of the heap, which indicates a bug in mycode.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while mycode.exe has focus.