Index: /issm/trunk-jpl/src/c/classes/Dakota/IssmParallelDirectApplicInterface.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Dakota/IssmParallelDirectApplicInterface.cpp	(revision 21875)
+++ /issm/trunk-jpl/src/c/classes/Dakota/IssmParallelDirectApplicInterface.cpp	(revision 21876)
@@ -49,5 +49,6 @@
 				FemModel* femmodel;
 				
-				char     **responses_descriptors    = NULL;      //these are our! there are only numresponsedescriptors of them, not d_numresponses!!!
+				char     **responses_descriptors    = NULL;      //these are ours! there are only numresponsedescriptors of them, not d_numresponses!!!
+				char      *response_descriptor      = NULL;
 				int        numresponsedescriptors;
 				int        solution_type;
@@ -128,4 +129,9 @@
 				}
 				xDelete<char*>(variable_descriptors);
+				for(i=0;i<numFns;i++){
+					response_descriptor=responses_descriptors[i];
+					xDelete<char>(response_descriptor);
+				}
+				if(responses_descriptors) xDelete<char*>(responses_descriptors);
 				xDelete<IssmDouble>(responses);
 				delete femmodel;
Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 21875)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 21876)
@@ -172,5 +172,5 @@
 }
 /*}}}*/
-void     Penta::BasalNodeIndices(int* pnumindices,int** pindices,int finiteelement){/*{{{*/
+void       Penta::BasalNodeIndices(int* pnumindices,int** pindices,int finiteelement){/*{{{*/
 
 	PentaRef::BasalNodeIndices(pnumindices,pindices,finiteelement);
@@ -2213,4 +2213,5 @@
 void       Penta::ResetHooks(){/*{{{*/
 
+	if(this->nodes) xDelete<Node*>(this->nodes);
 	this->nodes=NULL;
 	this->vertices=NULL;
Index: /issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp	(revision 21875)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp	(revision 21876)
@@ -808,4 +808,5 @@
 void     Tetra::ResetHooks(){/*{{{*/
 
+	if(this->nodes) xDelete<Node*>(this->nodes);
 	this->nodes=NULL;
 	this->vertices=NULL;
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 21875)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 21876)
@@ -2680,4 +2680,5 @@
 void       Tria::ResetHooks(){/*{{{*/
 
+	if(this->nodes) xDelete<Node*>(this->nodes);
 	this->nodes=NULL;
 	this->vertices=NULL;
Index: /issm/trunk-jpl/src/c/main/issm_dakota.cpp
===================================================================
--- /issm/trunk-jpl/src/c/main/issm_dakota.cpp	(revision 21875)
+++ /issm/trunk-jpl/src/c/main/issm_dakota.cpp	(revision 21876)
@@ -84,4 +84,8 @@
 	env.execute();
 
+	xDelete<char>(dakota_input_file);
+	xDelete<char>(dakota_output_file);
+	xDelete<char>(dakota_error_file);
+
 	/*Return unix success: */
 	return 0; 
@@ -90,3 +94,4 @@
 	return 1;
 	#endif
+
 }
