code: private void freeChannels() {
          for (ChannelInfo info : channels.values()) {
              freePacket(info.getReadPacket());
              freePacket(info.getWritePacket());
          }
          channels.clear();
      }
docs: Releases the channels.