diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-16 11:46:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-16 11:46:19 +0200 |
commit | 2c62d79bc914a6024afb842b56929df46660b50a (patch) | |
tree | ce2ab6d5f7a72e2faebbdf36c9a9c6e3711ad675 /odb/mysql | |
parent | 5e17d609ae59dc07514e2af945db05be05db968c (diff) |
Add pointer guard for naked pointer
Diffstat (limited to 'odb/mysql')
-rw-r--r-- | odb/mysql/source.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/odb/mysql/source.cxx b/odb/mysql/source.cxx index a9f8a99..4854a68 100644 --- a/odb/mysql/source.cxx +++ b/odb/mysql/source.cxx @@ -911,8 +911,10 @@ namespace mysql << "{" << "pointer_type p (access::object_factory< " << type << " >::create ());" + << "pointer_traits< pointer_type >::guard g (p);" << "init (pointer_traits< pointer_type >::get_ref (p), " << "sts.image ());" + << "g.release ();" << "return p;" << "}" << "return pointer_type ();" |