free_lp

Deletes an lprec structure and initialise the plp variable.

void free_lp(lprec **plp);

Return Value

None

Parameters

plp

lprec structure to delete. After the call, *plp will be set to NULL.

Remarks

The free_lp function frees all memory allocated to the lp structure and initialises the *plp variable.

Example

#include <stdio.h>
#include <stdlib.h>
#include "lp_lib.h"

int main(void)
{
  lprec *lp;

  /* Create a new LP model */
  lp = make_lp(0, 0);
  if(lp == NULL) {
    fprintf(stderr, "Unable to create new LP model\n");
    return(1);
  }

  /* Model created */

  /*
  .
  .
  .
  */

  free_lp(&lp);
  return(0);
}

lp_solve API reference

See Also delete_lp, make_lp, read_lp, read_LP, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI