You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by nb...@apache.org on 2003/08/07 05:16:41 UTC

cvs commit: jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet VelocityViewServlet.java

nbubna      2003/08/06 20:16:41

  Modified:    src/java/org/apache/velocity/tools/view/servlet
                        VelocityViewServlet.java
  Log:
  allow system to reclaim objects held by pooled writers (bug 18951)
  
  Revision  Changes    Path
  1.12      +5 -1      jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/VelocityViewServlet.java
  
  Index: VelocityViewServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/VelocityViewServlet.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- VelocityViewServlet.java	22 Jul 2003 21:14:58 -0000	1.11
  +++ VelocityViewServlet.java	7 Aug 2003 03:16:41 -0000	1.12
  @@ -629,6 +629,10 @@
                       // don't close to allow us to play
                       // nicely with others.
                       vw.flush();
  +                    /* This hack sets the VelocityWriter's internal ref to the 
  +                     * OutputStreamWriter to null to keep memory free while
  +                     * the writer is pooled. See bug report #18951 */
  +                    vw.recycle(null);
                       writerPool.put(vw);
                   }                
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org