refCnt() is 1 but internally 2?
See original GitHub issueI found a memory leak in my software and wanted to fix it. The problem is, that I’m not shure where the refCnt
really is:
if i realease the byteBufMessage
after adding the message to the list object, I get an error that the refcnt already is 0.
my inbound stack: SSLHandler -> Websocket -> Some custom handler my outbound stack MessageToMessageEncoder -> IdleStateHandler
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Webflux - How to prevent an IllegalReferenceCountException ...
I am using the spring WebClient to make two calls in parallel. One of the call results is passed back as a ResponseEntity,...
Read more >refcnt.h - Apple Open Source
Atomic internally uses C11 atomic * operations and requires no external synchronization, whereas the locked flavor * assumes the refcnt object is locked...
Read more >ReferenceCountUpdater xref - Netty
15 */ 16 package io.netty.util.internal; 17 18 import static ... 0 : rawCnt >>> 1; 73 } 74 75 /** 76 * Like...
Read more >io.netty.handler.codec.ByteToMessageDecoder - 即时通讯网
ChannelInputShutdownEvent; 26 import io.netty.util.internal. ... refCnt() > 1 || cumulation instanceof ReadOnlyByteBuf) { 83 // Expand cumulation (by ...
Read more >edenhill/librdkafka - Gitter
%7|1459950863.869|DESTROY|rdkafka#consumer-2| Destroy internal ... %7|1459950863.878|X|rdkafka#consumer-2| :0/internal: refcnt 1, ops 0, outbuf 0, wait 0, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@njhill Thank you very much. Its not trivial to have everything leak free. Helped me a lot!
@konsultaner the raw value of the internal
refCnt
field itself is not the actual ref count, as warned by the comment next to it:The mapping is described here: https://github.com/netty/netty/blob/4.1/common/src/main/java/io/netty/util/internal/ReferenceCountUpdater.java#L32-L34. So 2 here really means a ref count of 1.