Re: Luabind, do not collect my garbages please?

hymedia <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <000a01c9964b$cf160450$6d420cf0$@ca>
Thx for your response James,

	#include <luabind/adopt_policy.hpp>
	#include <boost/shared_ptr.hpp>

		.def("SetGeometry",
&Actor::SetGeometry, adopt(_1))

Well I did try this and I m getting :

Error	1	error C2039: 'match' : is not a member of
'luabind::detail::adopt_policy<BOOST_PP_ITERATION_0>::only_accepts_nonconst_
pointers'	\luabind\detail\compute_score.hpp	29

Im not sure what I did wrong here but the _1 is giving hard time.

Any ideas?

-----Original Message-----
From: James Porter [mailto:[email protected]] 
Sent: Monday, February 23, 2009 9:52 PM
To: [email protected]
Subject: Re: [luabind] Luabind, do not collect my garbages please?

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))

- Jim

----------------------------------------------------------------------------
--
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
_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user


------------------------------------------------------------------------------
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
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.