fixed memory leak
This commit is contained in:
@@ -91,6 +91,7 @@ class InMemoryCacheHandler(
|
|||||||
val buf = ctx.alloc().heapBuffer()
|
val buf = ctx.alloc().heapBuffer()
|
||||||
InflaterOutputStream(ByteBufOutputStream(buf)).use {
|
InflaterOutputStream(ByteBufOutputStream(buf)).use {
|
||||||
value.content.readBytes(it, value.content.readableBytes())
|
value.content.readBytes(it, value.content.readableBytes())
|
||||||
|
value.content.release()
|
||||||
buf.retain()
|
buf.retain()
|
||||||
}
|
}
|
||||||
ctx.writeAndFlush(LastCacheContent(buf))
|
ctx.writeAndFlush(LastCacheContent(buf))
|
||||||
|
Reference in New Issue
Block a user