Open
Description
I didnt try with a clean app but with my engine it crashes (only for other people, I couldn't reproduce it) when i use
// LuaState lua
LuaTable table = lua.newTable();
table["derp"] = () { return player.x; };
When I use derp frequently by calling the lua function which calls derp it will eventually crash after some undefined time. However when I create a function for that and then reference that, it will never crash. Maybe its something with the D garbage collector deleting the lambdas because it thinks it isnt used. So this works:
// LuaState lua
LuaTable table = lua.newTable();
int derp() { return player.x; }
table["derp"] = &derp;
Metadata
Metadata
Assignees
Labels
No labels