Commit 3b365a23 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Merge branch 'geometry_fortify' into 'master'

Resolve memory leak.

See merge request !104
parents 55525692 42d82e64
Pipeline #136349 passed with stages
in 19 minutes and 2 seconds
...@@ -26,6 +26,7 @@ Plane *GeometryFactory::createPlane(GeometryPool &pool, const Real a, ...@@ -26,6 +26,7 @@ Plane *GeometryFactory::createPlane(GeometryPool &pool, const Real a,
return plane; return plane;
} }
Cuboid *GeometryFactory::createCuboid(GeometryPool &pool, const Real x0, Cuboid *GeometryFactory::createCuboid(GeometryPool &pool, const Real x0,
const Real x1, const Real y0, const Real x1, const Real y0,
const Real y1, const Real z0, const Real y1, const Real z0,
...@@ -188,8 +189,10 @@ Union *GeometryFactory::createUnion(GeometryPool &pool, GeometryObject *left, ...@@ -188,8 +189,10 @@ Union *GeometryFactory::createUnion(GeometryPool &pool, GeometryObject *left,
} }
Union *theUnion = createUnion(pool, left, allOnTheRight); Union *theUnion = createUnion(pool, left, allOnTheRight);
delete allOnTheRight;
return theUnion; return theUnion;
} }
Instance *GeometryFactory::createInstance(GeometryPool &pool, Instance *GeometryFactory::createInstance(GeometryPool &pool,
GeometryObject *object, GeometryObject *object,
Instance *parent) Instance *parent)
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