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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user