[project @ 1998-11-26 09:17:22 by sof]
[ghc-hetmet.git] / ghc / runtime / storage / SMinit.lc
index 586c348..5f9459a 100644 (file)
@@ -25,8 +25,14 @@ exitSM (smInfo *sm_info)
 {
 #ifndef PAR
     int rc;
-     /* Upon closing down the storage manager, we free all foreign objects */
+     /* Upon closing down the storage manager, we free all foreign objects 
+        (in new *and* old generations) 
+     */
     rc = freeForeigns(sm_info->ForeignObjList);
+# if defined(GCap) || defined(GCgn)
+    rc = freeForeigns(sm_info->OldForeignObjList);
+# endif
+
 #endif
      /* Return code ignored for now */
     stat_exit(sm_info->hp - hp_start);