Example #1
0
//
// release reference to lua object
//
func (self *RefLua) Release() {
	if self.Ref != 0 && self.VM.globalL != nil {
		C.luaL_unref(self.VM.globalL, C.LUA_REGISTRYINDEX, C.int(self.Ref))
	}
	self.VM = nil
	self.Ref = 0
}
Example #2
0
// luaL_unref
func (L *State) Unref(t int, ref int) {
	C.luaL_unref(L.s, C.int(t), C.int(ref))
}