[cig-commits] r21787 - short/3D/PyLith/trunk/libsrc/pylith/topology

brad at geodynamics.org brad at geodynamics.org
Tue Apr 9 15:42:25 PDT 2013


Author: brad
Date: 2013-04-09 15:42:25 -0700 (Tue, 09 Apr 2013)
New Revision: 21787

Modified:
   short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc
Log:
Fixed memory leak.

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc	2013-04-09 22:24:17 UTC (rev 21786)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc	2013-04-09 22:42:25 UTC (rev 21787)
@@ -1020,6 +1020,9 @@
   err = VecGetSize(_globalVec, &globalSize);CHECK_PETSC_ERROR(err);
   //assert(order->getLocalSize()  == localSize);
   //assert(order->getGlobalSize() == globalSize);
+
+  err = DMDestroy(&sinfo.dm);CHECK_PETSC_ERROR(err);
+  err = VecDestroy(&sinfo.vector);CHECK_PETSC_ERROR(err);
   sinfo.vector = _globalVec;
   sinfo.dm     = _dm;
 



More information about the CIG-COMMITS mailing list