MCPcopy Create free account
hub / github.com/creatale/node-dv / cvReleaseData

Function cvReleaseData

deps/opencv/modules/core/src/array.cpp:972–997  ·  view source on GitHub ↗

Deallocates array's data

Source from the content-addressed store, hash-verified

970
971// Deallocates array's data
972CV_IMPL void
973cvReleaseData( CvArr* arr )
974{
975 if( CV_IS_MAT_HDR( arr ) || CV_IS_MATND_HDR( arr ))
976 {
977 CvMat* mat = (CvMat*)arr;
978 cvDecRefData( mat );
979 }
980 else if( CV_IS_IMAGE_HDR( arr ))
981 {
982 IplImage* img = (IplImage*)arr;
983
984 if( !CvIPL.deallocate )
985 {
986 char* ptr = img->imageDataOrigin;
987 img->imageData = img->imageDataOrigin = 0;
988 cvFree( &ptr );
989 }
990 else
991 {
992 CvIPL.deallocate( img, IPL_IMAGE_DATA );
993 }
994 }
995 else
996 CV_Error( CV_StsBadArg, "unrecognized or unsupported array type" );
997}
998
999
1000// Retrieves essential information about image ROI or CvMat data

Callers 4

cvSetDataFunction · 0.85
cvReleaseImageFunction · 0.85
core_c.hFile · 0.85
cvReleaseHistFunction · 0.85

Calls 2

cvDecRefDataFunction · 0.85
deallocateMethod · 0.45

Tested by

no test coverage detected