]> source.dussan.org Git - jgit.git/commit
Fix RefDirectory not closing resources 02/55902/5
authorHugo Arès <hugo.ares@ericsson.com>
Tue, 8 Sep 2015 13:21:31 +0000 (09:21 -0400)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 7 Apr 2016 09:32:57 +0000 (11:32 +0200)
commit53ea86cd7be3859ff741ea2b9760396ffabf5fe0
tree7f99d3c74df2e26ea5e2b1847e4b24322151f8a7
parent83235432e7fd789261cad7729bf3febfc168cd6f
Fix RefDirectory not closing resources

When repositories are opened using the RepositoryCache, they are kept in
memory and when the repository usage counter reaches 0, the
Repository.close method is called which then calls close method on its
reference and object databases.

The problem is that RefDirectory.close method was a no-op and the
reference database was kept in memory. This problem is only happening
when opening a repository using the RepositoryCache because it never
evicts repositories, it's just calling the close method.

Change-Id: Iacb961de8e8b1f5b37824bf0d1a4caf4c6f1233f
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java