From 23e314d23f0b0cb8f6ffb65048d618d539686bb9 Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 28 Nov 2001 08:17:17 +0000 Subject: [PATCH] Plug a small memory leak, where we leaked 8 or 12 bytes per declared parameter. git-svn-id: https://svn.dealii.org/trunk@5286 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/parameter_handler.cc | 8 ++++++++ deal.II/doc/news/2001/c-3-2.html | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/deal.II/base/source/parameter_handler.cc b/deal.II/base/source/parameter_handler.cc index 823a184145..2c3d802578 100644 --- a/deal.II/base/source/parameter_handler.cc +++ b/deal.II/base/source/parameter_handler.cc @@ -1076,6 +1076,14 @@ ParameterHandler::memory_consumption () const ParameterHandler::Section::~Section () { + // first release the memory pointed + // to by the second component of + // the pair, since we became owner + // of that memory through the + // clone() call + for (EntryType::iterator q=entries.begin(); q!=entries.end(); ++q) + delete q->second.second; + // then clear entire map entries.clear (); std::map::iterator p; diff --git a/deal.II/doc/news/2001/c-3-2.html b/deal.II/doc/news/2001/c-3-2.html index 5cc40a9cab..d93386b97a 100644 --- a/deal.II/doc/news/2001/c-3-2.html +++ b/deal.II/doc/news/2001/c-3-2.html @@ -67,6 +67,14 @@ documentation, etc.

base

    +
  1. + Fixed: In the ParameterHandler + class, we leaked 8 or 12 bytes of memory per declared + parameter. This is now fixed. +
    + (WB 2001/11/28) +

    +
  2. New: Functions::CutOffFunctionCinfty, Functions::CutOffFunctionW1, and -- 2.39.5