From f384c0e79e69bf72adf0e18097c270b04519ebb8 Mon Sep 17 00:00:00 2001 From: Daniel Wallin Date: Wed, 9 Dec 2009 13:26:52 +0100 Subject: [PATCH] docs: Add note about functions returning smart pointers. --- doc/docs.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/docs.rst b/doc/docs.rst index 5c94549..a1aeb12 100755 --- a/doc/docs.rst +++ b/doc/docs.rst @@ -848,7 +848,15 @@ For example: .def(constructor<>()) Will cause luabind to hold any instance created on the Lua side in a -``boost::scoped_ptr``. +``boost::scoped_ptr``. Note that this doesn't mean **all** instances +will be held by a ``boost::scoped_ptr``. If, for example, you +register a function:: + + std::auto_ptr make_X(); + +the instance returned by that will be held in ``std::auto_ptr``. This +is handled automatically for all smart pointers that implement a +``get_pointer()`` overload. .. important:: -- 2.11.4.GIT