Release ObjectReader before the cached ObjectDatabase
I don't want to play games with the order of release here, its probably safer to release the reader before the database, just in case the one depends on the other. Change-Id: I2394c7d2477eaf7a7e1556fc3393c59d3b31e764 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
b40f02eb1a
commit
e01abbd543
|
@ -424,13 +424,6 @@ public void index(final ProgressMonitor progress) throws IOException {
|
||||||
writeIdx();
|
writeIdx();
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
|
||||||
InflaterCache.release(inflater);
|
|
||||||
} finally {
|
|
||||||
inflater = null;
|
|
||||||
objectDatabase.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (readCurs != null)
|
if (readCurs != null)
|
||||||
readCurs.release();
|
readCurs.release();
|
||||||
|
@ -438,6 +431,13 @@ public void index(final ProgressMonitor progress) throws IOException {
|
||||||
readCurs = null;
|
readCurs = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
InflaterCache.release(inflater);
|
||||||
|
} finally {
|
||||||
|
inflater = null;
|
||||||
|
objectDatabase.close();
|
||||||
|
}
|
||||||
|
|
||||||
progress.endTask();
|
progress.endTask();
|
||||||
if (packOut != null)
|
if (packOut != null)
|
||||||
packOut.close();
|
packOut.close();
|
||||||
|
|
Loading…
Reference in New Issue