Deallocates the CvMat structure and underlying data
| 177 | |
| 178 | // Deallocates the CvMat structure and underlying data |
| 179 | CV_IMPL void |
| 180 | cvReleaseMat( CvMat** array ) |
| 181 | { |
| 182 | if( !array ) |
| 183 | CV_Error( CV_HeaderIsNull, "" ); |
| 184 | |
| 185 | if( *array ) |
| 186 | { |
| 187 | CvMat* arr = *array; |
| 188 | |
| 189 | if( !CV_IS_MAT_HDR_Z(arr) && !CV_IS_MATND_HDR(arr) ) |
| 190 | CV_Error( CV_StsBadFlag, "" ); |
| 191 | |
| 192 | *array = 0; |
| 193 | |
| 194 | cvDecRefData( arr ); |
| 195 | cvFree( &arr ); |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | |
| 200 | // Creates a copy of matrix |
no test coverage detected