Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /main/branches/4.1.3/trunk/interpreter/classes/PackageClass.cpp [r9301] .. [r9302] Maximize Restore

  Switch to side-by-side view

--- a/main/branches/4.1.3/trunk/interpreter/classes/PackageClass.cpp
+++ b/main/branches/4.1.3/trunk/interpreter/classes/PackageClass.cpp
@@ -563,6 +563,7 @@
         // if no directly provided source, resolve the name in the global context and have the instance
         // load the file.
         RexxString *resolvedName = instance->resolveProgramName(nameString, OREF_NULL, OREF_NULL);
+        ProtectedObject n(resolvedName);
         package = instance->loadRequires(activity, nameString, resolvedName);
     }
     else
@@ -571,6 +572,8 @@
         RexxArray *sourceArray = arrayArgument(_source, "source");
         package = instance->loadRequires(activity, nameString, sourceArray);
     }
+
+    ProtectedObject p(package);
 
     /* Give new object its behaviour     */
     package->setBehaviour(((RexxClass *)this)->getInstanceBehaviour());