Index: /trunk/glueforge/templates/psdb/createtable_c.tt
===================================================================
--- /trunk/glueforge/templates/psdb/createtable_c.tt	(revision 4008)
+++ /trunk/glueforge/templates/psdb/createtable_c.tt	(revision 4009)
@@ -18,4 +18,6 @@
     }
 
+    psDBCleanup(dbh);
+
     exit(EXIT_SUCCESS);
 }
Index: /trunk/glueforge/templates/psdb/dbcleanup_c.tt
===================================================================
--- /trunk/glueforge/templates/psdb/dbcleanup_c.tt	(revision 4008)
+++ /trunk/glueforge/templates/psdb/dbcleanup_c.tt	(revision 4009)
@@ -9,5 +9,8 @@
         exit(EXIT_FAILURE);
     }
+
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS [% table_name %]");
+
+    psDBCleanup(dbh);
 
     exit(EXIT_SUCCESS);
Index: /trunk/glueforge/templates/psdb/dbsetup_c.tt
===================================================================
--- /trunk/glueforge/templates/psdb/dbsetup_c.tt	(revision 4008)
+++ /trunk/glueforge/templates/psdb/dbsetup_c.tt	(revision 4009)
@@ -18,4 +18,6 @@
     [% namespace %]CreateTable(dbh);
 
+    psDBCleanup(dbh);
+
     exit(EXIT_SUCCESS);
 }
Index: /trunk/glueforge/templates/psdb/droptable_c.tt
===================================================================
--- /trunk/glueforge/templates/psdb/droptable_c.tt	(revision 4008)
+++ /trunk/glueforge/templates/psdb/droptable_c.tt	(revision 4009)
@@ -15,4 +15,6 @@
     }
 
+    psDBCleanup(dbh);
+
     exit(EXIT_SUCCESS);
 }
Index: /trunk/glueforge/templates/psdb/init_c.tt
===================================================================
--- /trunk/glueforge/templates/psdb/init_c.tt	(revision 4008)
+++ /trunk/glueforge/templates/psdb/init_c.tt	(revision 4009)
@@ -11,4 +11,6 @@
     }
 
+    psDBCleanup(dbh);
+
     exit(EXIT_SUCCESS);
 }
