From 70a23eb4ae0cde47a0be484ea12b8c0744d30853 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 16 Dec 2006 15:48:51 +0000
Subject: [PATCH] destroy meshRep in deMeshGEdge

---
 Mesh/Makefile      | 8 ++++++--
 Mesh/meshGEdge.cpp | 4 +++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/Mesh/Makefile b/Mesh/Makefile
index 5e8e9bcfb9..39ee4e2089 100644
--- a/Mesh/Makefile
+++ b/Mesh/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.155 2006-12-16 14:37:20 geuzaine Exp $
+# $Id: Makefile,v 1.156 2006-12-16 15:48:51 geuzaine Exp $
 #
 # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 #
@@ -101,7 +101,11 @@ meshGEdge.o: meshGEdge.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Geo/SVector3.h ../Numeric/Numeric.h ../Common/Context.h \
   ../Geo/ExtrudeParams.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/MElement.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h BackgroundMesh.h
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/ExtrudeParams.h ../Geo/MRep.h \
+  ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/GEntity.h \
+  ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Geo/MVertex.h \
+  ../Geo/MEdge.h ../Geo/MElement.h ../Common/VertexArray.h ../Common/OS.h \
+  BackgroundMesh.h
 meshGEdgeExtruded.o: meshGEdgeExtruded.cpp ../Geo/ExtrudeParams.h \
   ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp
index ec0c2c0cbb..ccb2282aae 100644
--- a/Mesh/meshGEdge.cpp
+++ b/Mesh/meshGEdge.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGEdge.cpp,v 1.24 2006-12-05 14:22:05 remacle Exp $
+// $Id: meshGEdge.cpp,v 1.25 2006-12-16 15:48:51 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -23,6 +23,7 @@
 #include "meshGEdge.h"
 #include "GEdge.h"
 #include "GFace.h"
+#include "MRep.h"
 #include "BackgroundMesh.h"
 #include "Context.h"
 #include "Message.h"
@@ -193,6 +194,7 @@ void deMeshGEdge :: operator() (GEdge *ge)
   ge->mesh_vertices.clear();
   for (unsigned int i=0;i<ge->lines.size();i++) delete ge->lines[i];
   ge->lines.clear();
+  if(ge->meshRep) ge->meshRep->destroy();
 }
 
 void meshGEdge :: operator() (GEdge *ge) 
-- 
GitLab