Re: Remove Luabind ownership on C++ pointer?

neosettlers <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hummm...

Luabind, you’re a guest in my home (C++ library), on your way out, please do not take my garbage with you! (I wish I wouldn’t have to ask)

No offense but making extra functions or even worst, a manager for this is embarrassing... this should be solved with something like this:

.def(constructor<>())
.def(destructor<>()) /// if present, take the garbage out, if not please, mind your own business!

Regards,

-----Original Message-----
From: eduard mueller [mailto:[email protected]] 
Sent: Thursday, September 30, 2010 11:08 AM
To: [email protected]
Subject: Re: [luabind] Remove Luabind ownership on C++ pointer?

On Thu, Sep 30, 2010 at 16:56, neosettlers <[email protected]> wrote:
> Technique "shared_ptr"
>
> I like this method but so far, I can’t make it work. Even when using shared_ptr its still go there on GC:

When using shared_ptrs, you have to use them everywhere to transfer/keep track of the objects lifetime correctly. Using something which stores the reference count in the object itself, like boost::intrusive_ptr may be the better choice then. But this really depends on what you actually do with the object...

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
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.