Adopt policy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Adopt policy

Alexander Gladysh
Hi, all!

The Luabind manual gives following example on adopt policy:

  X* create() { return new X; }
  ...
  module(L) [ def("create", &create, adopt(result)) ];

In which way object, returned by create() will be destroyed? Would Lua
(5.1.1) itself deallocate memory with it's allocator (which is, by
default, AFAIR, the realloc function), or would Luabind call delete on
the passed pointer?

Thanks in advance,
Alexander.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user