[armedbear-cvs] r13132 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Mon Jan 10 21:26:54 UTC 2011


Author: ehuelsmann
Date: Mon Jan 10 16:26:51 2011
New Revision: 13132

Log:
Fix: When deleting a package it remains on the usedByList of
the packages in its use list. Usually a package uses *at least*
the CL package, meaning that packages don't get GC-ed.

Modified:
   trunk/abcl/src/org/armedbear/lisp/Package.java

Modified: trunk/abcl/src/org/armedbear/lisp/Package.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Package.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Package.java	Mon Jan 10 16:26:51 2011
@@ -161,6 +161,13 @@
     public final synchronized boolean delete()
     {
         if (name != null) {
+            LispObject usedPackages = useList;
+            while (usedPackages != NIL) {
+                Package pkg = (Package) usedPackages.car();
+                unusePackage(pkg);
+                usedPackages = usedPackages.cdr();
+            }
+
             Packages.deletePackage(this);
 
             makeSymbolsUninterned(internalSymbols);




More information about the armedbear-cvs mailing list