/* tessMeshDeleteMesh( mesh ) will free all storage for any valid mesh. */ void tessMeshDeleteMesh( TESSalloc* alloc, TESSmesh *mesh ) { deleteBucketAlloc(mesh->edgeBucket); deleteBucketAlloc(mesh->vertexBucket); deleteBucketAlloc(mesh->faceBucket); alloc->memfree( alloc->userData, mesh ); }
void tessDeleteTess( TESStesselator *tess ) { struct TESSalloc alloc = tess->alloc; deleteBucketAlloc( tess->regionPool ); if( tess->mesh != NULL ) { tessMeshDeleteMesh( &alloc, tess->mesh ); tess->mesh = NULL; } if (tess->vertices != NULL) { alloc.memfree( alloc.userData, tess->vertices ); tess->vertices = 0; } if (tess->vertexIndices != NULL) { alloc.memfree( alloc.userData, tess->vertexIndices ); tess->vertexIndices = 0; } if (tess->elements != NULL) { alloc.memfree( alloc.userData, tess->elements ); tess->elements = 0; } alloc.memfree( alloc.userData, tess ); }
/* really tessDictListDeleteDict */ void dictDeleteDict( TESSalloc* alloc, Dict *dict ) { deleteBucketAlloc( dict->nodePool ); alloc->memfree( alloc->userData, dict ); }
void stackDelete( EdgeStack *stack ) { deleteBucketAlloc( stack->nodeBucket ); }