// 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 }
// 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 } }
func (jq *JQ) teardown() { C.jq_teardown(&jq.state) }
// Free will release all memory from Jq state func (j *jqExecutor) free() { C.jq_teardown(&j.state) }