1 // Copyright Daniel Wallin 2009. Use, modification and distribution is
2 // subject to the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #include <luabind/luabind.hpp>
11 static std::size_t count
;
24 std::size_t Foo::count
= 0;
26 void test_main(lua_State
* L
)
28 using namespace luabind
;
35 // This used to leak the last created instance in one of the
36 // upvalues to the "super" function.
38 disable_super_deprecation();
42 "function Bar.__init(self)\n"
51 assert(Foo::count
== 1);
57 lua_gc(L
, LUA_GCCOLLECT
, 0);
59 assert(Foo::count
== 0);