grails/grails-core — pull request #491 by candrews (2014-05-03 17:35:40+00:00)
Title: Use a new ClassLoader for each GSP

Since ClassLoaders keep references to all classes they load, using one class loader for all GSPs means that all GSPs always stay in memory - even if they're never used again (such as if a new version of that GSP is loaded because its source changed). Using a new ClassLoader for each GSP solves that problem.
This further improves the memory use of Grails when doing GSP reloading, see
GRAILS-11296