int TaoDestroy_CG(TAO_SOLVER tao, void *solver) { TAO_CG *cg = (TAO_CG *) solver; int info; TaoFunctionBegin; info = TaoVecDestroy(cg->gg); CHKERRQ(info); info = TaoVecDestroy(cg->ww);CHKERRQ(info); info = TaoVecDestroy(cg->dx);CHKERRQ(info); info = TaoLineSearchDestroy(tao);CHKERRQ(info); TaoFree(cg); TaoFunctionReturn(0); }Other algorithms may destroy matrices, linear solvers, index sets, or other objects needed by the solver. This routine is called from within the TaoDestroy() routine.