← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Fix memory leak in XMLMeshData.

 

On Thursday 09 July 2009 10:09:41 DOLFIN wrote:
> One or more new changesets pushed to the primary dolfin repository.
> A short summary of the last three changesets is included below.
>
> changeset:   6459:b68827516f37420ae5b66bcf6e99a9d93b84f813
> tag:         tip
> user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> date:        Thu Jul 09 09:05:54 2009 +0100
> files:       dolfin/io/XMLMeshData.cpp
> description:
> Fix memory leak in XMLMeshData.
>

If you havn't found it already I think you need to apply:

diff -r b68827516f37 dolfin/la/PETScKrylovSolver.cpp
--- a/dolfin/la/PETScKrylovSolver.cpp   Thu Jul 09 09:05:54 2009 +0100
+++ b/dolfin/la/PETScKrylovSolver.cpp   Thu Jul 09 10:13:21 2009 +0200
@@ -257,7 +257,7 @@
   {
     if (!ksp.unique())
       error("Cannot create new KSP Krylov solver. More than one object points 
to the underlying PETSc object.");
-    KSPDestroy(*ksp);
+    ksp.reset();
   }
   else
   {

To fix the other memory leak.

(We tend to work on the same fixes at the same times ;) )
 
Johan
> changeset:   6458:8dacb335c9825380a2e614f5de2ae89f79131995
> user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> date:        Wed Jul 08 23:13:53 2009 +0100
> files:       demo/ode/reaction/cpp/main.cpp
> description:
> Comment out reaction ODE demo. Gives error when run.
>
>
> changeset:   6457:9a186fe3462a2a64546b26d2bed74a00a925957a
> parent:      6455:487d3de6d9cf1341ab1b78281f7205b83737a388
> parent:      6456:740bfce065bfac104f34152107b56bbfe9032d1f
> user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> date:        Wed Jul 08 22:27:51 2009 +0100
> files:
> description:
> merge.
>
> ----------------------------------------------------------------------
> For more details, visit http://www.fenics.org/hg/dolfin
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev




References