示例#1
0
文件: mruby.go 项目: ujun/go-mruby
// Close a Mrb, this must be called to properly free resources, and
// should only be called once.
func (m *Mrb) Close() {
	// Delete all the methods from the state
	delete(stateMethodTable, m.state)

	// Close the state
	C.mrb_close(m.state)
}
示例#2
0
文件: mruby.go 项目: Gimi/go-mruby
func (m *MRuby) Close() {
	if m.mrb != nil {
		C.mrb_close(m.mrb)
	}
}
示例#3
0
文件: gomruby.go 项目: AlekSi/gomruby
// Deletes mruby VM.
func (m *MRuby) Delete() {
	if m.state != nil {
		C.mrb_close(m.state)
		m.state = nil
	}
}
示例#4
0
文件: mruby.go 项目: manveru/go-mruby
func (m *MRuby) Close() {
	if m.state != nil {
		C.mrb_close(m.state)
	}
}