Re: Luabind, do not collect my garbages please?
Daniel Wallin <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
James Porter wrote:
> neosettlers wrote:
>> My promblem is that when lua_close() is called, it try to delete
>> pointers wich are already being handle via a C++ memory manager. In
>> short, I have no need for Lua to collect my garbages from a C++ class
>> being created in Lua.
>
> Since Lua owns "myGeo", it's going to delete it. You probably want
> something like this:
>
> .def("SetGeometry", &Actor::SetGeometry, adopt(_1))
I think that should be "adopt(_2)". _1 refers to the "this" argument.
--
Daniel Wallin
BoostPro Computing
http://www.boostpro.com
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H