444445446447448449450451452453454
encoding), 4 * 1024, true); } else { vw.recycle(new OutputStreamWriter(output, encoding)); } template.merge(context, vw); } finally
472473474475476477478479480481482
/* * 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); } } }
712713714715716717718719720721722
{ vw = new VelocityWriter(writer, 4 * 1024, true); } else { vw.recycle(writer); } performMerge(template, context, vw); } finally {
729730731732733734735736737738739
// nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * PrintWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } catch (Exception e) { velocity.debug("VelocityViewServlet: " +
399400401402403404405406407408409
{ vw = new VelocityWriter( new OutputStreamWriter(output, encoding), 4*1024, true); } else { vw.recycle(new OutputStreamWriter(output, encoding)); } template.merge( context, vw); } finally
585586587588589590591592593594595
{ vw = new VelocityWriter(writer, 4 * 1024, true); } else { vw.recycle(writer); } template.merge(context, vw); } finally {
602603604605606607608609610611612
// nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * PrintWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } catch (Exception e) { Velocity.debug("VelocityViewServlet: " +
394395396397398399400401402403404
10671068106910701071107210731074107510761077
10841085108610871088108910901091109210931094
// nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * PrintWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } catch (Exception e) { getLog().debug("Trouble releasing VelocityWriter: " +