Index: /anuga_core/source/anuga/alpha_shape/alpha_shape.py
===================================================================
--- /anuga_core/source/anuga/alpha_shape/alpha_shape.py	(revision 4667)
+++ /anuga_core/source/anuga/alpha_shape/alpha_shape.py	(revision 4668)
@@ -225,5 +225,15 @@
         self.boundary = [self.edge[k] for k in reg_edge]
         #print "alpha boundary edges ", self.boundary
-        self._init_boundary_triangles()            
+        self._init_boundary_triangles()
+        
+        del tridata['generatedtriangleneighborlist']
+        del tridata['generatedpointmarkerlist']
+        del tridata['generatedpointlist']
+        #del tridata['generatedpointattributetitlelist']
+        del tridata['generatedsegmentlist']
+        del tridata['generatedsegmentmarkerlist']
+        del tridata['generatedtrianglelist']
+        del tridata['generatedtriangleattributelist']
+        del tridata['generatedpointattributelist']
         return
 
Index: /anuga_core/source/anuga/mesh_engine/mesh_engine.py
===================================================================
--- /anuga_core/source/anuga/mesh_engine/mesh_engine.py	(revision 4667)
+++ /anuga_core/source/anuga/mesh_engine/mesh_engine.py	(revision 4668)
@@ -6,4 +6,5 @@
 
 import anuga.mesh_engine.mesh_engine_c_layer as triang
+#import anuga.mesh_engine.list_dic as triang
 
 from Numeric import array, Float, Int32
@@ -121,6 +122,8 @@
     #print "segatts", segatts
     #print "mode", mode
-    return triang.genMesh(points,segments,holes,regions,
+    mesh_dict = triang.genMesh(points,segments,holes,regions,
                           pointatts,segatts, mode, segments.flat)
+    mesh_dict['qaz'] = 1 #debugging
+    return mesh_dict
 
 def add_area_tag(regions):
Index: /anuga_core/source/anuga/mesh_engine/mesh_engine_c_layer.c
===================================================================
--- /anuga_core/source/anuga/mesh_engine/mesh_engine_c_layer.c	(revision 4667)
+++ /anuga_core/source/anuga/mesh_engine/mesh_engine_c_layer.c	(revision 4668)
@@ -26,5 +26,14 @@
           
      This is all that is needed to accomplish an intial triangulation.       
-     A dictionary of the Triangle output is returned.                                   
+     A dictionary of the Triangle output is returned.
+            
+     I thought this function was leaking. That the returned data 
+     structure didn't get garbage collected.  I decided this using  
+     gc.get_objects() and seeing the dic still hanging around.
+     I'm not so sure this means its leaking.  Check by looking at 
+     the overall memory use.  Anyhow, I delete the lists that are 
+     returned in the dic structre after they are used now, in alpha
+     shape and mesh_engine.
+     
      Precondition
      End list in the pointattributelist has to have the same length
@@ -311,5 +320,4 @@
     Py_DECREF(ii); Py_DECREF(holderlist);
   }   
-     
   /* Free in/out structure memory */
   
@@ -356,4 +364,5 @@
   }
   
+  /*Py_DECREF(holder);*/
   return Py_BuildValue((char *)"O", holder);
 }
Index: /anuga_core/source/anuga/pmesh/mesh.py
===================================================================
--- /anuga_core/source/anuga/pmesh/mesh.py	(revision 4667)
+++ /anuga_core/source/anuga/pmesh/mesh.py	(revision 4668)
@@ -1165,4 +1165,5 @@
                               meshDict['pointlist'])
         #print "%%%%%%%%%%%%%%%%%%%%%%%%%%%generated",generatedMesh
+        generatedMesh['qaa'] = 1
         generatedMesh['generatedsegmentmarkerlist'] = \
              segment_ints2strings(generatedMesh['generatedsegmentmarkerlist'],
@@ -1491,7 +1492,4 @@
         triangle attribute list: [(T1att), (T2att), ...]
 
-
-            (list of a list of strings)
-        lone point list:[point1, ...] (list of integers)
         """
         #Clear the current generated mesh values
@@ -1567,5 +1565,16 @@
             #print "Removing the loner", loner
             #self.meshVertices.pop(loner)
-
+        # delete the info from this data structure
+        del genDict['generatedtriangleneighborlist']
+        del genDict['generatedpointmarkerlist']
+        del genDict['generatedpointlist']
+        del genDict['generatedpointattributetitlelist']
+        del genDict['generatedsegmentlist']
+        del genDict['generatedsegmentmarkerlist']
+        del genDict['generatedtrianglelist']
+        del genDict['generatedtriangleattributelist']
+        del genDict['generatedpointattributelist']
+        genDict['zpp'] = 1 # just an identifier
+            
     def setMesh(self, genDict):
         """
Index: /anuga_core/source/anuga/shallow_water/benchmark_sww2dem.py
===================================================================
--- /anuga_core/source/anuga/shallow_water/benchmark_sww2dem.py	(revision 4667)
+++ /anuga_core/source/anuga/shallow_water/benchmark_sww2dem.py	(revision 4668)
@@ -132,5 +132,5 @@
     ofile = 'lbm_resultsII.csv'
     run_profile = False #True
-    size_list = [[4,5],[5,40]]
+    size_list = [[4,5],[50,40]]
     #size_list = [[5,4]]
 
@@ -166,5 +166,6 @@
             gc.collect()
             print "mem", mem
-            print " gc.get_objects() ", gc.get_objects() 
+            #print "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
+            #print "gc.get_referrers()", gc.get_referrers()
             #sys.gettotalrefcount() 
             fd.write(str(size[0]*size[1]) + delimiter +
@@ -175,3 +176,4 @@
                      str(m1)  + delimiter +
                      str(time) + delimiter + "\n")
-fd.close()                         
+    print " gc.get_objects() ", gc.get_objects()
+    fd.close()                         
