PVS: V1023 A pointer without owner is added to the container by the 'emplace_back' method. A memory leak will occur in case of an exception.

This commit is contained in:
wmayer
2020-07-17 16:00:02 +02:00
parent e1363e5d0f
commit 1d7299502e
5 changed files with 11 additions and 11 deletions

View File

@@ -1911,7 +1911,7 @@ PyObject* MeshPy::getSegmentsByCurvature(PyObject *args)
#else
int num = (int)Py::Int(t[4]);
#endif
segm.emplace_back(new MeshCore::MeshCurvatureFreeformSegment(meshCurv.GetCurvature(), num, tol1, tol2, c1, c2));
segm.emplace_back(std::make_shared<MeshCore::MeshCurvatureFreeformSegment>(meshCurv.GetCurvature(), num, tol1, tol2, c1, c2));
}
finder.FindSegments(segm);