-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Can CC helps tracking the Reference Counting problem? #18556
He-Pin
started this conversation in
CC experiment
-
After reading the doc of cc, I still now get how CC can help tracking the Reference Counting problem.
In Netty, there is a pooled ByteBuf
, which will report as Memory LEAK if the bytebuf get gced but with referenceCnt > 0.
Can CC helps here?
def useByteBuf() :Unit { withByteBuf {buf => val bytes = ByteBufUtil.getBytes(buf) // some usage never call byteBuf.release } } def withByteBuf( op: ByteBuf^ => Unit):Unit = { val allocator = pooledByteBufAllocator val buf = allocator.byteBuf(1024) op(buf) //... never call byteBuf.release }
Can CC help and reporting the byteBuf.release
is not called?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment