[GRADLE-3009] File handle leaks when using AntBuilder (daemon) Created: 29/Jan/14 Updated: 18/Feb/14 Resolved: 18/Feb/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.10 |
Fix Version/s: | 1.12-rc-1 |
Type: | Bug | ||
Reporter: | Luke Daley | Assignee: | Luke Daley |
Resolution: | Fixed | Votes: | 0 |
Description |
Ant internally uses an AntClassLoader. It keeps a cache of File → JarFile (AntClassLoader#jarFiles). This cache holds open JarFile objects. This cache is designed to be open for the duration of the build, and then closed at the end. The problem is that we never tell Ant that the build has finished and therefore it never closes this cache. To remedy this, we need to make sure we call fireBuildFinished() on all ant Project instances when the build is over. |