Esempio n. 1
0
File: glpk.go Progetto: 6br/go-glpk
// Delete deletes a problem.  Calling Delete on a deleted problem will
// have no effect (It is save to do so). But calling any other method
// on a deleted problem will panic. The problem will be deleted on
// garbage collection but you can do this as soon as you no longer
// need the optimization problem.
func (p *Prob) Delete() {
	if p.p.p != nil {
		C.glp_delete_prob(p.p.p)
		p.p.p = nil
	}
}
Esempio n. 2
0
File: glpk.go Progetto: 6br/go-glpk
func finalizeProb(p *prob) {
	if p.p != nil {
		C.glp_delete_prob(p.p)
		p.p = nil
	}
}