示例#1
0
文件: jq.go 项目: 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
}
示例#2
0
文件: jq.go 项目: 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
	}
}
示例#3
0
文件: jq.go 项目: wxf4150/go-jq
func (jq *JQ) teardown() {
	C.jq_teardown(&jq.state)
}
示例#4
0
文件: jq.go 项目: vantroy/jq
// Free will release all memory from Jq state
func (j *jqExecutor) free() {
	C.jq_teardown(&j.state)
}