Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Can CC helps tracking the Reference Counting problem? #18556

He-Pin started this conversation in CC experiment
Discussion options

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?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /