question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Netty 5] Remove ReferenceCounted.release(int) and retain(int)

See original GitHub issue

Usually people just use release() or retain() but we also have overloads that take an int as argument. Having these overloads make the guards against overflow a lot harder and more complex. We should just remove these to simplify.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
njhillcommented, Nov 21, 2018

@trustin my example was just to illustrate how limiting the size can’t in itself help to eliminate this kind of race condition, I wasn’t suggesting it as an approach! If muli-release/retain is kept then I guess keeping it atomic would probably be better.

0reactions
normanmaurercommented, Nov 26, 2018

ok let me close this as “won’t fix” 😃 Thanks for all the input.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReferenceCounted (Netty API Reference (4.1.85.Final))
int, refCnt(). Returns the reference count of this object. ; boolean, release(). Decreases the reference count by 1 and deallocates this object if...
Read more >
Example usage for io.netty.util ReferenceCountUtil release
Try to call ReferenceCounted#release() if the specified message implements ... getZ() & 0x1F) << 5)); region.seek(8 * id); int offset = region.
Read more >
Reactor Netty Reference Guide
The Reactor Netty reference guide is available as HTML documents. ... compress(int) : The compression is performed once the response size ...
Read more >
io.netty.util.ReferenceCountUtil.retain java code examples
Popular methods of ReferenceCountUtil · release. Try to call ReferenceCounted#release(int) if the specified message implements ReferenceCounted. · safeRelease.
Read more >
io.netty.util.ReferenceCounted Java Examples
This page shows Java code examples of io.netty.util. ... int fetchSize ) { if (fetchSize > 0) { int statementId = identifier. ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found