ReferenceCountUtil.safeRelease

Try to call {@link ReferenceCounted#release(int)} if the specified message implements {@link ReferenceCounted}. If the specified message doesn't implement {@link ReferenceCounted}, this method does nothing. Unlike {@link #release(Object)} this method catches an exception raised by {@link ReferenceCounted#release(int)} and logs it, rather than rethrowing it to the caller. It is usually recommended to use {@link #release(Object, int)} instead, unless you absolutely need to swallow an exception.

  1. void safeRelease(Object msg)
  2. void safeRelease(Object msg, int decrement)
    class ReferenceCountUtil
    static
    void
    safeRelease
    (
    Object msg
    ,)

Meta