Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netty ButeBuf recycle #11

Open
georgeyanev opened this issue Mar 27, 2019 · 0 comments
Open

Netty ButeBuf recycle #11

georgeyanev opened this issue Mar 27, 2019 · 0 comments

Comments

@georgeyanev
Copy link

Here when we use the ByteBuf's array to form a ByteString how and when release of ByteBuf input happens?

Since it is not released here the next handler will receive a ByteString and could not release it and that would be a memory leak. Right?

And even if it is released here then the backing array is in danger as it will be recycled.

out.add(ByteString.fromArray(msg.array(), msg.arrayOffset(), length))

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

No branches or pull requests

1 participant