sbt/sbt — pull request #1227 by jsuereth (2014-04-02 20:12:36+00:00)
Title: Autorun GC and finalizers after each task run.

* Add `sbt.task.autogc` flag to disable
* Add hook to automatically GC/finalizer after running tasks or
cancelling tasks

This is to workaround too-lazy GC leaving too many classloaders in
memory and causing PermGen OOMs far before necessary.

Fixes #1223

Review by @cunei and @eed3si9n

Discussion for @ijuma -> What do you think of the current mechanism to disable this feature? Until I can break binary compatibility (and put the flag on the execution config object), this was the best solution I had, which is why it's `private[sbt]` (so we can modify it in 1.0 for a better solution).