Re: collectgarbage question.

Taesoo Kwon <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Yes, I have. It gave the same result.
A single collectgarbage call was not effective using any of the options.
So I thought this may be what they call incremental garbage collection.

On Wed, Sep 23, 2009 at 6:27 PM, Tony Kostanjsek <[email protected]>wrote:

> have you tried collectgarbage("collect") to perform a full garbage
> collection cycle? I'm not even sure what it does without an argument:
> http://www.lua.org/manual/5.1/manual.html
>
> ------------------------------
> *Von:* Taesoo Kwon <[email protected]>
> *An:* [email protected]
> *Gesendet:* Mittwoch, den 23. September 2009, 23:04:16 Uhr
> *Betreff:* Re: [luabind] collectgarbage question.
>
> I am sorry. This wasn't a bug but a feature of lua 5.1.4.
> I had to add one more collectgarbage() call.
>
> do
>       local skel=VRMLloader("aa.wrl")
>       skel.dofInfo:setFrameRate(30)
> end
>
> collectgarbage()
> collectgarbage() -- two cycles are needed.
>
>
>
> On Wed, Sep 23, 2009 at 4:36 PM, Taesoo Kwon <[email protected]> wrote:
>
>> 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&reg; 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&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> luabind-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.