Release memory storage: */
| 171 | |
| 172 | /* Release memory storage: */ |
| 173 | CV_IMPL void |
| 174 | cvReleaseMemStorage( CvMemStorage** storage ) |
| 175 | { |
| 176 | if( !storage ) |
| 177 | CV_Error( CV_StsNullPtr, "" ); |
| 178 | |
| 179 | CvMemStorage* st = *storage; |
| 180 | *storage = 0; |
| 181 | if( st ) |
| 182 | { |
| 183 | icvDestroyMemStorage( st ); |
| 184 | cvFree( &st ); |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | |
| 189 | /* Clears memory storage (return blocks to the parent, if any): */ |
no test coverage detected