Example #1
0
// 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)
}
Example #2
0
func (m *MRuby) Close() {
	if m.mrb != nil {
		C.mrb_close(m.mrb)
	}
}
Example #3
0
// Deletes mruby VM.
func (m *MRuby) Delete() {
	if m.state != nil {
		C.mrb_close(m.state)
		m.state = nil
	}
}
Example #4
0
func (m *MRuby) Close() {
	if m.state != nil {
		C.mrb_close(m.state)
	}
}