AddressLib/vopio.c
MomVop *freevop(MomVop *vop)

{
	if (vop) {

		// free a_chan
		if (vop->a_chan) {
			if (vop->a_chan->data->u)
				free(vop->a_chan->data->u);

			free(vop->a_chan);
	    }

		// free y_chan
		if (vop->y_chan) {
			if (vop->y_chan->data->u) {
			  free(vop->y_chan->data->u);
			}
			free(vop->y_chan);
		}

		// free u_chan
		if (vop->u_chan) {

			if (vop->u_chan->data->u)
			  free(vop->u_chan->data->u);

			free(vop->u_chan);
		}

		// free v_chan
		if (vop->v_chan) {

			if (vop->v_chan->data->u)
			  free(vop->v_chan->data->u);

			free(vop->v_chan);
		}

		//if (vop->pextend)
		//	free(vop->pextend);


		free(vop);
	}

  return 0;
}
/**********************************************************************/
/*  freevop  frees allocated memory of vop                            */
/**********************************************************************/
freevop  frees allocated memory of vop
freevop frees allocated memory of vop
MomVop *freevop(MomVop *vop)
{
	if (vop) {
		if (vop->a_chan) {
			if (vop->a_chan->data->u)
				free(vop->a_chan->data->u);
			free(vop->a_chan);
	    }
		if (vop->y_chan) {
			if (vop->y_chan->data->u) {
			  free(vop->y_chan->data->u);
			}
			free(vop->y_chan);
		}
		if (vop->u_chan) {
			if (vop->u_chan->data->u)
			  free(vop->u_chan->data->u);
			free(vop->u_chan);
		}
		if (vop->v_chan) {
			if (vop->v_chan->data->u)
			  free(vop->v_chan->data->u);
			free(vop->v_chan);
		}
		free(vop);
	}
  return 0;
}
MomVop * freevop ( MomVop * vop ) { if ( vop ) { if ( vop -> a_chan ) { if ( vop -> a_chan -> data -> u ) free ( vop -> a_chan -> data -> u ) ; free ( vop -> a_chan ) ; } if ( vop -> y_chan ) { if ( vop -> y_chan -> data -> u ) { free ( vop -> y_chan -> data -> u ) ; } free ( vop -> y_chan ) ; } if ( vop -> u_chan ) { if ( vop -> u_chan -> data -> u ) free ( vop -> u_chan -> data -> u ) ; free ( vop -> u_chan ) ; } if ( vop -> v_chan ) { if ( vop -> v_chan -> data -> u ) free ( vop -> v_chan -> data -> u ) ; free ( vop -> v_chan ) ; } free ( vop ) ; } return 0 ; }
freevop  frees allocated memory of vop
freevop frees allocated memory of vop
// free a_chan
 // free y_chan
 // free u_chan
 // free v_chan
 //if (vop->pextend)
 //	free(vop->pextend);
