]> source.dussan.org Git - aspectj.git/commitdiff
Added a removeAllListeners method to be called from test suite to
authoracolyer <acolyer>
Sat, 16 Aug 2003 19:29:42 +0000 (19:29 +0000)
committeracolyer <acolyer>
Sat, 16 Aug 2003 19:29:42 +0000 (19:29 +0000)
prevent listener leakage which cripples performance of the test cases.

asm/src/org/aspectj/asm/AsmManager.java

index fced532bc59c4fc6500b0b1ca1a7e4da49acdc25..d276fe56980649e277eba4de8c0e487d94aa034d 100644 (file)
@@ -119,6 +119,14 @@ public class AsmManager {
         structureListeners.remove(listener);
     }
 
+       // this shouldn't be needed - but none of the people that add listeners
+       // in the test suite ever remove them. AMC added this to be called in
+       // setup() so that the test cases would cease leaking listeners and go 
+       // back to executing at a reasonable speed.
+       public void removeAllListeners() {
+               structureListeners.clear();
+       }
+
     private void notifyListeners() {
         for (Iterator it = structureListeners.iterator(); it.hasNext(); ) {
             ((IHierarchyListener)it.next()).elementsUpdated(hierarchy);