lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi Marc,

Am 2013-11-12 20:09, schrieb Marc Lepage:
Still, reading through that thread, it *seems* to me like I should be OK, but it's not
*obvious* to me that it's OK.

I'm not entirely sure if I understood your problem, because, as someone else in this thread already mentioned, weak table entries either are collected (and removed from the weak table) or they are not (and still there).

When you bind C++ objects to Lua, using smart pointers is a great help, as they remove concerns regarding the lifetime of the bound object that is possibly used from both C++ and Lua, and possibly done with in one but still used in the other.

As you mention the problem of having only a single Lua instance for a single C++ instance, maybe this thread has some additional info for you?

Best regards,

Dipl.-Inf. Carsten Fuchs

Carsten Fuchs Software
Industriegebiet 3, c/o Rofu, 55768 Hoppstädten-Weiersbach, Germany
Internet: | E-Mail:

Cafu - the open-source game and graphics engine for multiplayer 3D action