BorisMoore / jsrender

A lightweight, powerful and highly extensible templating engine. In the browser or on Node.js, with or without jQuery.
http://www.jsviews.com
MIT License
2.68k stars 340 forks source link

When template-declaration script element is removed, the cached template is not released #264

Closed BorisMoore closed 9 years ago

BorisMoore commented 9 years ago

See the thread here: https://github.com/BorisMoore/jsrender/pull/236#issuecomment-122131961

The fix is to cache the template using $.data(elem, ...), provided jQuery is being used, rather than caching on the $.templates object. Then jQuery will release the cached template if elem is removed.

BorisMoore commented 9 years ago

This has been fixed with commit 65.