From: wolf Date: Wed, 28 Nov 2001 17:25:11 +0000 (+0000) Subject: Fix a memory leak. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c827873fbd43e70c3155c13a637005142098967;p=dealii-svn.git Fix a memory leak. git-svn-id: https://svn.dealii.org/trunk@5294 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/mapping_q.cc b/deal.II/deal.II/source/fe/mapping_q.cc index cf1db84ddf..34d87c42aa 100644 --- a/deal.II/deal.II/source/fe/mapping_q.cc +++ b/deal.II/deal.II/source/fe/mapping_q.cc @@ -1222,7 +1222,9 @@ Point MappingQ::transform_unit_to_real_cell ( compute_mapping_support_points(cell, p_data->mapping_support_points); - return transform_unit_to_real_cell_internal(*p_data); + const Point p=transform_unit_to_real_cell_internal(*p_data); + delete mdata; + return p; } diff --git a/deal.II/deal.II/source/fe/mapping_q1.cc b/deal.II/deal.II/source/fe/mapping_q1.cc index e0d0c50b98..46d0cd81d5 100644 --- a/deal.II/deal.II/source/fe/mapping_q1.cc +++ b/deal.II/deal.II/source/fe/mapping_q1.cc @@ -881,6 +881,7 @@ Point MappingQ1::transform_unit_to_real_cell ( // transformation shape values // already computed at point p. const Quadrature point_quadrature(p); + InternalData *mdata=dynamic_cast ( get_data(update_transformation_values, point_quadrature)); Assert(mdata!=0, ExcInternalError()); @@ -889,7 +890,9 @@ Point MappingQ1::transform_unit_to_real_cell ( // points compute_mapping_support_points(cell, mdata->mapping_support_points); - return transform_unit_to_real_cell_internal(*mdata); + const Point p_real=transform_unit_to_real_cell_internal(*mdata); + delete mdata; + return p_real; }