[glom] PyGlomRelated: Use unique_ptr::release() instead of get.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] PyGlomRelated: Use unique_ptr::release() instead of get.
- Date: Fri, 5 Feb 2016 11:19:37 +0000 (UTC)
commit dd4833a370856e4b28a8dd77bc2b385f68a379a3
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Feb 5 12:10:25 2016 +0100
PyGlomRelated: Use unique_ptr::release() instead of get.
To avoid a double delete.
glom/libglom/python_embed/py_glom_related.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glom/libglom/python_embed/py_glom_related.cc b/glom/libglom/python_embed/py_glom_related.cc
index 4d43def..236a9b6 100644
--- a/glom/libglom/python_embed/py_glom_related.cc
+++ b/glom/libglom/python_embed/py_glom_related.cc
@@ -89,7 +89,7 @@ boost::python::object PyGlomRelated::getitem(const boost::python::object& cppite
pyRelatedRecord->set_relationship(iterFind->second, from_key_value, record->m_document);
//Store it in the cache:
- boost::python::object objectRelatedRecord(pyRelatedRecord.get());
+ boost::python::object objectRelatedRecord(pyRelatedRecord.release());
m_map_relatedrecords[key] = objectRelatedRecord;
return objectRelatedRecord;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]