Index: /issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 11692)
+++ /issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 11693)
@@ -81,6 +81,12 @@
 
 void xdelete(Matrix** pv){
+	
 	if (pv && *pv){
+		#ifdef _HAVE_PARALLEL_ 
+		/*There is no mxDelete in the Matlab API -> using delete trips up Matlab. So we 
+		 * don't actually free memory in Matlab, we let the memory manager do that. We only
+		 * free in parallel: */
 		delete *pv;
+		#endif
 		*pv=NULL;
 	}
@@ -88,7 +94,12 @@
 
 void xdelete(Vector** pv){
+
 	if (pv && *pv){
-		//delete *pv;
-		VecFree(&(*pv)->vector);
+		#ifdef _HAVE_PARALLEL_ 
+		/*There is no mxDelete in the Matlab API -> using delete trips up Matlab. So we 
+		 * don't actually free memory in Matlab, we let the memory manager do that. We only
+		 * free in parallel: */
+		delete *pv;
+		#endif
 		*pv=NULL;
 	}
