dlr 2003/08/22 16:23:47
Modified: src/java/org/apache/velocity/servlet VelocityServlet.java
Log:
* src/java/org/apache/velocity/servlet/VelocityServlet.java
mergeTemplate(): Clear the VelocityWriter's reference to its
internal OutputStreamWriter to allow the latter to be GC'd while vw
is pooled.
Issue: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18951
Obtained from: Nathan Bubna
Revision Changes Path
1.50 +10 -3
jakarta-velocity/src/java/org/apache/velocity/servlet/VelocityServlet.java
Index: VelocityServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/servlet/VelocityServlet.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -u -r1.49 -r1.50
--- VelocityServlet.java 4 May 2003 17:46:34 -0000 1.49
+++ VelocityServlet.java 22 Aug 2003 23:23:47 -0000 1.50
@@ -482,10 +482,17 @@
* don't close to allow us to play
* nicely with others.
*/
-
vw.flush();
+
+ /*
+ * Clear the VelocityWriter's reference to its
+ * internal OutputStreamWriter to allow the latter
+ * to be GC'd while vw is pooled.
+ */
+ vw.recycle(null);
+
writerPool.put(vw);
- }
+ }
}
catch (Exception e)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]