[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: setting a global with lua_Object
- From: Jason <i8msft@...>
- Date: Thu, 14 Sep 2000 14:08:42 -0400
>return {field1 = "some value", field2 = "other value"}
>
>// In your C++ code
>
>X::X(char* file_name)
>{
> if (lua_dofile(file_name) ==0)
> {
> lua_Object l_obj = lua_lua2C(1);
> if (lua_istable(l_obj))
> // do what you want
> else
> // ERROR
> }
> else
> // ERROR
>}
>
>Regards,
>Renato
That looks like a better way to load the table, but still doesn't really answer my question. I need to somehow force that table to be garbage collected when the class is deleted (in the destructor). Without a reference to the table (the global variable), how do you release it?
=^_^=
----------------------
Do you do Linux? :)
Get your FREE @linuxstart.com email address at: http://www.linuxstart.com