netty/netty — pull request #2920 by nmittler (2014-09-19 21:02:10+00:00)
Title: Change HTTP/2 tests to retain rather than copy ByteBufs

Motivation:

The current build is showing potential leaks in the HTTP/2 tests that
use Http2TestUtil.FrameCountDown, which copies the buffers when it
receives them from the decoder. The leak detecor sees this copy as the
source of a leak. It would be better all around to just retain, rather
than copying the buffer. This should help to lower the overall memory
footprint of the tests as well as potentially getting rid of the
reported "leaks".

Modifications:

Modified Http2TestUtil to use ByteBuf.retain() everywhere that was
previously calling ByteBuf.copy().

Result:

Smaller memory footprint for tests and hopefully getting rid of reported
leaks.