| 130 | } |
| 131 | |
| 132 | public close(): void { |
| 133 | this.thread.lua.module.removeFunction(this.gcPointer) |
| 134 | this.thread.lua.module.removeFunction(this.functionWrapper) |
| 135 | // Doesn't destroy the Lua thread, just function pointers. |
| 136 | this.callbackContext.close() |
| 137 | // Destroy the Lua thread |
| 138 | this.callbackContext.lua.luaL_unref(this.callbackContext.address, LUA_REGISTRYINDEX, this.callbackContextIndex) |
| 139 | } |
| 140 | |
| 141 | public isType(_thread: Thread, _index: number, type: LuaType): boolean { |
| 142 | return type === LuaType.Function |