Commit 7d5e8ac4 authored by Murray Cumming's avatar Murray Cumming
Browse files

PyGlomRelated: A small use of unique_ptr<> to avoid a naked new.

parent 16bc9123
......@@ -85,11 +85,11 @@ boost::python::object PyGlomRelated::getitem(const boost::python::object& cppite
//Return a new RelatedRecord:
auto pyRelatedRecord = new PyGlomRelatedRecord();
auto pyRelatedRecord = std::unique_ptr<PyGlomRelatedRecord>();
pyRelatedRecord->set_relationship(iterFind->second, from_key_value, record->m_document);
//Store it in the cache:
boost::python::object objectRelatedRecord(pyRelatedRecord);
boost::python::object objectRelatedRecord(pyRelatedRecord.get());
m_map_relatedrecords[key] = objectRelatedRecord;
return objectRelatedRecord;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment