From 5936a2db82bc9b9a03fbc2d3829fba8be6664974 Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Fri, 7 Oct 2016 16:06:25 +0300 Subject: [PATCH] Part: Py API: fix memory leak in Part.Vertex.Point fix #2728 --- src/Mod/Part/App/TopoShapeVertexPyImp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Part/App/TopoShapeVertexPyImp.cpp b/src/Mod/Part/App/TopoShapeVertexPyImp.cpp index c8178ec18..dc803e8bc 100644 --- a/src/Mod/Part/App/TopoShapeVertexPyImp.cpp +++ b/src/Mod/Part/App/TopoShapeVertexPyImp.cpp @@ -178,7 +178,7 @@ Py::Object TopoShapeVertexPy::getPoint(void) const { const TopoDS_Vertex& v = TopoDS::Vertex(getTopoShapePtr()->getShape()); gp_Pnt p = BRep_Tool::Pnt(v); - return Py::Object(new Base::VectorPy(new Base::Vector3d(p.X(),p.Y(),p.Z()))); + return Py::asObject(new Base::VectorPy(new Base::Vector3d(p.X(),p.Y(),p.Z()))); } PyObject *TopoShapeVertexPy::getCustomAttributes(const char* /*attr*/) const