constructor function for lua LuaOwnedPtr will hold ptr by lua and auto collect it;
| 58 | // constructor function for lua |
| 59 | // LuaOwnedPtr will hold ptr by lua and auto collect it; |
| 60 | static LuaOwnedPtr<Foo> create(int v) { |
| 61 | return new Foo(v); |
| 62 | } |
| 63 | |
| 64 | // raw ptr not hold by lua, lua not collect it |
| 65 | static const Foo* getInstance() { |
nothing calls this directly
no outgoing calls
no test coverage detected