Example #1
0
File: jq.go Project: wxf4150/jq-go
// Close closes a JQ state, releasing resources.
func (s *Vm) Close() error {
	if s == nil {
		return nil
	}
	C.jq_teardown(&s.jq)
	s.jq = nil
	return nil
}
Example #2
0
File: jq.go Project: ashb/jqrepl
// Close the handle to libjq and free C resources
func (jq *Jq) Close() {
	if jq._state != nil {
		C.jq_teardown(&jq._state)
		jq._state = nil
	}
	if jq.errorStoreId != 0 {
		globalErrorChannels.Delete(jq.errorStoreId)
		jq.errorStoreId = 0
	}
}
Example #3
0
File: jq.go Project: wxf4150/go-jq
func (jq *JQ) teardown() {
	C.jq_teardown(&jq.state)
}
Example #4
0
File: jq.go Project: vantroy/jq
// Free will release all memory from Jq state
func (j *jqExecutor) free() {
	C.jq_teardown(&j.state)
}