[Templates] fix filter leaks

Tatsuhiko Miyagawa miyagawa@edge.co.jp
Fri, 13 Sep 2002 20:42:56 +0900


Using filter plugin (Comma, Number.Format, FillInForm) in big loop
seems to leak. I've searched the archive and have found

http://template-toolkit.org/pipermail/templates/2001-March/000784.html

which says:

| One simple solution would be to have the context reset() method clear
| the FILTER_CACHE hash, breaking the circle and allowing Perl to clean up.
| Possibly the better approach is to improve the filters mechanism in some
| way to allow filters to specify that they shouldn't be cached.  Prevention
| rather than cure.
| 
| If you get a chance and have the inclination, try fixing the 
| Template::Context reset() method to 'undef $self->{ FILTER_CACHE }'
| and see if that helps.

How's the current status for this issue?
Can I do something in Plugin module code to avoid caching?

--
Tatsuhiko Miyagawa <miyagawa@edge.co.jp>