Index: ../trunk-jpl/src/c/cores/controltao_core.cpp
===================================================================
--- ../trunk-jpl/src/c/cores/controltao_core.cpp	(revision 18852)
+++ ../trunk-jpl/src/c/cores/controltao_core.cpp	(revision 18853)
@@ -128,6 +128,8 @@
 	#if defined (_HAVE_PETSC_) && (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 5)
 	TaoFinalize();
 	#endif
+	G->pvector->vector = NULL;
+	delete G;
 }
 
 #if defined (_HAVE_PETSC_) && (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 5)
