svn commit: r730151 - in /lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon: generation/SitetreeFragmentGenerator.java transformation/IconUrlTransformer.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Tue Dec 30 07:25:03 2008
New Revision: 730151

URL: http://svn.apache.org/viewvc?rev=730151&view=rev
Log:
Recycle pipeline components to avoid dead chunks of memory.

Modified:
    lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java
    lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/transformation/IconUrlTransformer.java

Modified: lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java?rev=730151&r1=730150&r2=730151&view=diff
==============================================================================
--- lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java (original)
+++ lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java Tue Dec 30 07:25:03 2008
@@ -196,7 +196,7 @@
             }
             
             this.cacheKey = pubId + "/" + area + this.path;
-            source = resolver.resolveURI(this.site.getRepositoryNode().getSourceURI());
+            source = this.resolver.resolveURI(this.site.getRepositoryNode().getSourceURI());
             this.validity = source.getValidity();
             
         } catch (ProcessingException e) {
@@ -213,6 +213,17 @@
 
     }
 
+    public void recycle() {
+        super.recycle();
+        this.areas = null;
+        this.path = null;
+        this.initialTree = false;
+        this.attributes = null;
+        this.cacheKey = null;
+        this.validity = null;
+        this.site = null;
+    }
+
     /**
      * @see org.apache.cocoon.generation.Generator#generate()
      */

Modified: lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/transformation/IconUrlTransformer.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/transformation/IconUrlTransformer.java?rev=730151&r1=730150&r2=730151&view=diff
==============================================================================
--- lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/transformation/IconUrlTransformer.java (original)
+++ lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/transformation/IconUrlTransformer.java Tue Dec 30 07:25:03 2008
@@ -136,4 +136,12 @@
         }
     }
 
+    public void recycle() {
+        super.recycle();
+        this.factory = null;
+        this.pubId = null;
+        this.area = null;
+        this.linkResolver = null;
+    }
+
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.