Пример #1
0
// 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
	}
}
Пример #2
0
func finalizeProb(p *prob) {
	if p.p != nil {
		C.glp_delete_prob(p.p)
		p.p = nil
	}
}