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

Code check to prevent IllegalReferenceCountException to occur #12850

Closed
joyfulnikhil opened this issue Sep 30, 2022 · 1 comment
Closed

Code check to prevent IllegalReferenceCountException to occur #12850

joyfulnikhil opened this issue Sep 30, 2022 · 1 comment

Comments

@joyfulnikhil
Copy link

    Can a check for **cumulation.refCount() >0** be placed here? This will ensure that only those bytebuf are released whose refCount>0 and if bytebuf already has a refcount of 0, it is already deallocated or can be returned to the object pool. This will prevent IllegalReferenceCount from occurring. 

Not sure about the implication on memory (Whether this check will cause a memory leak ?)

Originally posted by @joyfulnikhil in #12662 (comment)

@normanmaurer
Copy link
Member

@joyfulnikhil this would just "hide" bugs.

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

2 participants