Author: michiel
Date: 2009-07-06 19:35:15 +0200 (Mon, 06 Jul 2009)
New Revision: 36589

Modified:
   
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/CloudTag.java
Log:
copied dereference() stuff from 1.8, which we seem to have forgotten. May solve 
some memory issues

Modified: 
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/CloudTag.java
===================================================================
--- 
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/CloudTag.java
   2009-07-06 15:32:41 UTC (rev 36588)
+++ 
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/CloudTag.java
   2009-07-06 17:35:15 UTC (rev 36589)
@@ -774,7 +774,7 @@
         if (cloud == null) {
             log.debug("Cloud is null, cannot check it");
             removeCloud();
-            return;
+           return;
         }
         // we have a cloud, check if it is a desired one
         // otherwise make it null.
@@ -1359,28 +1359,29 @@
         org.mmbase.bridge.util.CloudThreadLocal.unbind();
         org.mmbase.bridge.util.CloudThreadLocal.bind(prevCloudThreadLocal);
         pageContext.setAttribute(KEY, prevCloud, SCOPE);
+        dereference();
+        return super.doEndTag();
+    }
+    protected void dereference() {
         prevCloud = null;
         prevCloudThreadLocal = null;
-        return super.doEndTag();
-    }
-
-    public void doFinally() {
-        // can be cleaned for gc:
-        super.doFinally();
         cookies = null;
         cloudContext = null;
         cloud = null;
-        prevCloud = null;
-        prevCloudThreadLocal = null;
         logon = null;
         session = null;
         request = null;
         response = null;
     }
 
+    public void doFinally() {
+        // can be cleaned for gc:
+        super.doFinally();
+        dereference();
+    }
+
     // if EVAL_BODY == EVAL_BODY_BUFFERED
     public int doAfterBody() throws JspTagException {
-
         if (EVAL_BODY == EVAL_BODY_BUFFERED) {
             try {
                 if (bodyContent != null) {

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to