collectgarbage question.
Taesoo Kwon <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am using luabind-0.8.1, lua 5.1.4, and VC2005.
I have a strange bug; collect garbage doesn't work in the following simple
code.
-----------------------------------------------------------------------
test1.lua -> Garbage collection doesn't work. (the dtor of VRMLloader class
is not called.)
do
local skel=VRMLloader("aa.wrl")
skel.dofInfo:setFrameRate(30)
end
collectgarbage()
-----------------------------------------------------------------------
test2.lua -> Garbage collection works. (dtor called)
do
local skel=VRMLloader("aa.wrl")
end
collectgarbage()
I have no idea what could cause the difference. Has anybody observed similar
situation?
-----------------------------------------------------------------------
binding:
class VRMLloader: public MotionLoader
{
public:
MotionDOFinfo dofInfo;
VRMLloader(const char* vrmlFile);
virtual ~VRMLloader() { printf("dtor called");}
...
};
luabind::class_<VRMLloader, MotionLoader>("VRMLloader")
.def_readwrite("dofInfo", &VRMLloader::dofInfo)
.def(luabind::constructor<const char*>())
Thanks.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user