Index: /trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/macros/plotdb.C	(revision 8706)
+++ /trunk/MagicSoft/Mars/datacenter/macros/plotdb.C	(revision 8707)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.34 2007-05-09 12:15:51 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.35 2007-08-24 14:37:58 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -131,6 +131,4 @@
         gStyle->SetOptStat(111111);
 
-        TSQLRow *row;
-
         // Create TGraph objects
         TGraph &gt = res.GetFieldCount()>4 ? *new TGraphErrors : *new TGraph;
@@ -158,4 +156,5 @@
 
         // Loop over the data
+        TSQLRow *row = 0;
         while ((row=res.Next()))
         {
@@ -166,4 +165,7 @@
             const char *snum = res.GetFieldCount()>3 ? (*row)[3] : 0;
             const char *verr = res.GetFieldCount()>4 ? (*row)[5] : 0;
+
+            delete row;
+
             if (!date || !val || !zd)
                 continue;
Index: /trunk/MagicSoft/Mars/datacenter/macros/plotoptical.C
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/macros/plotoptical.C	(revision 8706)
+++ /trunk/MagicSoft/Mars/datacenter/macros/plotoptical.C	(revision 8707)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: plotoptical.C,v 1.6 2006-11-17 11:45:29 dorner Exp $
+! $Name: not supported by cvs2svn $:$Id: plotoptical.C,v 1.7 2007-08-24 14:37:58 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -150,6 +150,4 @@
         gStyle->SetOptStat(111111);
 
-        TSQLRow *row;
-
         // Create TGraph objects
         TGraph &gt = res.GetFieldCount()>4 ? *new TGraphErrors : *new TGraph;
@@ -177,4 +175,5 @@
 
         // Loop over the data
+        TSQLRow *row=0;
         while ((row=res.Next()))
         {
@@ -185,4 +184,7 @@
             const char *snum = res.GetFieldCount()>3 ? (*row)[3] : 0;
             const char *verr = res.GetFieldCount()>4 ? (*row)[5] : 0;
+
+            delete row;
+
             if (!date || !val || !zd)
                 continue;
Index: /trunk/MagicSoft/Mars/datacenter/macros/plotrundb.C
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/macros/plotrundb.C	(revision 8706)
+++ /trunk/MagicSoft/Mars/datacenter/macros/plotrundb.C	(revision 8707)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1.2 2006-11-03 10:52:36 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1.3 2007-08-24 14:37:58 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -131,6 +131,4 @@
         gStyle->SetOptStat(111111);
 
-        TSQLRow *row;
-
         // Create TGraph objects
         TGraph &gt = res.GetFieldCount()>4 ? *new TGraphErrors : *new TGraph;
@@ -158,4 +156,5 @@
 
         // Loop over the data
+        TSQLRow *row=0;
         while ((row=res.Next()))
         {
@@ -166,4 +165,7 @@
             const char *snum = res.GetFieldCount()>3 ? (*row)[3] : 0;
             const char *verr = res.GetFieldCount()>4 ? (*row)[5] : 0;
+
+            delete row;
+
             if (!date || !val || !zd)
                 continue;
