Index: tol_tests/tol/Bugzilla/bug_001489/check1.tol
===================================================================
--- tol_tests/tol/Bugzilla/bug_001489/check1.tol	(revision bb29eda86139d6df28ebc6fad4894a584eec86e3)
+++ tol_tests/tol/Bugzilla/bug_001489/check1.tol	(revision bb29eda86139d6df28ebc6fad4894a584eec86e3)
@@ -0,0 +1,24 @@
+#Require NonLinGloOpt; // => NonLinGloOpt.5.2
+
+Real numObj.0 = Copy(NObject);
+WriteLn("numObj.0="<<numObj.0);
+
+Real {
+  NonLinGloOpt::@Problem problem = [[
+    Real n = 2;
+    Matrix lower_bounds = Row(1);
+    Matrix upper_bounds = Row(1);
+    Anything target = FindCode("Real", "Sin");
+    Set equations = Copy(Empty);
+    Set inequations =  Copy(Empty);
+    // Settings
+    Real sign = 1;
+    Real neededGlobal = 1;
+    Real id_analyticalClass = 1;
+    Real id_useGradient = 1
+  ]];
+1};
+
+Real numObj.1 = Copy(NObject);
+WriteLn("numObj.1="<<numObj.1);
+
Index: tol_tests/tol/Bugzilla/bug_001489/test.tol
===================================================================
--- tol_tests/tol/Bugzilla/bug_001489/test.tol	(revision bb29eda86139d6df28ebc6fad4894a584eec86e3)
+++ tol_tests/tol/Bugzilla/bug_001489/test.tol	(revision bb29eda86139d6df28ebc6fad4894a584eec86e3)
@@ -0,0 +1,28 @@
+//////////////////////////////////////////////////////////////////////////////
+// FILE   : test.tol
+// PURPOSE: test for a resolved bug
+//////////////////////////////////////////////////////////////////////////////
+
+//Sets the bugzilla identifier number, your e-mail and the bugŽs summary 
+  Real bugNum_ = 1489;
+  Text email_ = "vdebuen@tol-project.org"; 
+  Text summary_ = "Error al destruir un NonLinGloOpt::@Problem";
+  Text link_ = GetTolBugzillaLink(bugNum_);
+
+//Write here the initial test TOL code if needed
+  Real numErr0 = Copy(NError);
+  Set check1 = Include( "check1.tol" );
+  Real numErr1 = Copy(NError);
+
+  Set partialResults_ = [[ numErr0,numErr1, numObj.0, numObj.1 ]];
+
+//This is a messure of the success of the test 
+  Real quality_ = ( numErr1 == numErr0, numObj.1==numObj.0+2 );
+
+//Return the results 
+  Set resultStr_ = @strTestStatus(summary_, link_, quality_,
+                    "Partial results = "<<partialResults_,
+                    "NO DBServerType", "NO DBServerHost", "NO DBAlias",
+                    email_);
+  WriteLn(""<<resultStr_);
+  resultStr_
