Pass by value
AnonymousProgrammerLandau opened this issue · 1 comments
AnonymousProgrammerLandau commented
Enabling registration of free functions, function objects, member functions, etc. which can return instances of registered classes by value increases the applicability of Selene.
Those values should actually be copied over to Lua such that a Lua script can use them like any other value. This also reduces the risk of having objects in Lua referring to things living in C++ without being able to tell whether those things are still alive.
AnonymousProgrammerLandau commented
Work in progress at https://github.com/AnonymousProgrammerLandau/Selene/tree/PassByValue