func NewProblem() *Problem { cProblem := C.problem_new() problem := &Problem{cProblem} runtime.SetFinalizer(problem, func(p *Problem) { C.problem_free(p.problem) }) return problem }
func newProblem() *C.problem_t { problem := tryNew(func() unsafe.Pointer { return unsafe.Pointer(C.problem_new()) }) return (*C.problem_t)(problem) }