I would prefer having all of this code inside of the try/finally. Just in case new TreeWalk throws due to OutOfMemoryError, we can at least clean up the revWalk with a release() before the exception pops up the call stack.