[armedbear-cvs] r13133 - branches/0.24.x/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Mon Jan 10 22:01:38 UTC 2011


Author: ehuelsmann
Date: Mon Jan 10 17:01:37 2011
New Revision: 13133

Log:
Backport r13132: fixed memory leak upon package deletion.

Modified:
   branches/0.24.x/abcl/src/org/armedbear/lisp/Package.java

Modified: branches/0.24.x/abcl/src/org/armedbear/lisp/Package.java
==============================================================================
--- branches/0.24.x/abcl/src/org/armedbear/lisp/Package.java	(original)
+++ branches/0.24.x/abcl/src/org/armedbear/lisp/Package.java	Mon Jan 10 17:01:37 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