I use Apache httpasyncclient 4.1, in jconsole, I found that direct memory is continuously growing, I tried force gc, do not work.
And what confused me is that I do not use DirectByteBufferAllocator.
ManagedNHttpClientConnectionFactory connFactory = new ManagedNHttpClientConnectionFactory(null,
null, HeapByteBufferAllocator.INSTANCE);
connManager = new PoolingNHttpClientConnectionManager(ioreactor, connFactory,
socketFactoryRegistry, new DNSResolverWithCache(dnsCache));
I also grep the httpclient httpasynclient httpcore httpcore-nio's source code, only in the DirectByteBufferAllocator has the method allocateDirect (1024).