DESCRIPTION

JVMCBC-109: Null out ResponseBuffer events after usage.

Motivation
----------
The RequestHandler already nulls out events as quickly as possible
to prevent them from being references longer than absolutely needed.

The ResponseHandler is not doing that, keeping responses and observables
longer around. This may have bad GC impact, especially on lower traffic
applications where the 16k response buffer is not recycled completely
quickly.

Modifications
-------------
This changeset makes sure to null out response events after their usage,
and also simplifies the response handler so that they are released in
the same finally block (and not in many places throughout the same method).

The code relies on the fact that the finally method will be always called
by the JVM, even if exceptions are raised or return statements are run
in between.

Result
------
Carried response content is more quickly released (and GCed). Simplified
code on the request handler as well.

Change-Id: I0ec272226e0f29ee0da1020510db7b08fd1fc2a6


COMMENTS

author: Natasha Sullivan
date: 2014-12-31 13:21:35.753000000

Patch Set 2: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2014-12-31 13:38:34.515000000

Patch Set 2: Code-Review+2

-------------------------------------
