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

Function cvClearMemStorage

deps/opencv/modules/core/src/datastructs.cpp:190–203  ·  view source on GitHub ↗

Clears memory storage (return blocks to the parent, if any): */

Source from the content-addressed store, hash-verified

188
189/* Clears memory storage (return blocks to the parent, if any): */
190CV_IMPL void
191cvClearMemStorage( CvMemStorage * storage )
192{
193 if( !storage )
194 CV_Error( CV_StsNullPtr, "" );
195
196 if( storage->parent )
197 icvDestroyMemStorage( storage );
198 else
199 {
200 storage->top = storage->bottom;
201 storage->free_space = storage->bottom ? storage->block_size - sizeof(CvMemBlock) : 0;
202 }
203}
204
205
206/* Moves stack pointer to next block.

Callers 2

core_c.hFile · 0.85
cvFindNextContourFunction · 0.85

Calls 1

icvDestroyMemStorageFunction · 0.85

Tested by

no test coverage detected