code: @PreDestroy
      public final void dispose() {
          getConnectionPool().ifPresent(PoolResources::dispose);
          getThreadPool().dispose();
  
          try {
              ObjectName name = getByteBufAllocatorObjectName();
  
              if (ManagementFactory.getPlatformMBeanServer().isRegistered(name)) {
                  ManagementFactory.getPlatformMBeanServer().unregisterMBean(name);
              }
          } catch (JMException e) {
              this.logger.error("Unable to register ByteBufAllocator MBean", e);
          }
      }
docs: Disposes resources created to service this connection context