ReceivePack: Discard IndexPack as soon as possible
The IndexPack object carries a good bit of state within itself about the objects received over the wire. The earlier we can discard it, the sooner the GC is able to reclaim this chunk of memory for other uses. So drop it as soon as we are certain the pack is valid and we have no connectivity concerns. Change-Id: I1e8bc87c2e9183733043622237a064e55957891f Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
7a91b180c1
commit
8279361de8
|
@ -656,6 +656,7 @@ private void service() throws IOException {
|
||||||
receivePack();
|
receivePack();
|
||||||
if (isCheckReceivedObjects())
|
if (isCheckReceivedObjects())
|
||||||
checkConnectivity();
|
checkConnectivity();
|
||||||
|
ip = null;
|
||||||
unpackError = null;
|
unpackError = null;
|
||||||
} catch (IOException err) {
|
} catch (IOException err) {
|
||||||
unpackError = err;
|
unpackError = err;
|
||||||
|
|
Loading…
Reference in New Issue