Are there memory leaks in ElasticSearch's TransportClient 5.4.3 or is my code flawed?

I have a similar code and it is also leaking. I am using 5.5.1.

It seems to be leaking byte arrays:

The code looks like this:

try(PreBuiltTransportClient preBuiltTransportClient = new PreBuiltTransportClient(settings)) {
    try(TransportClient transportClient = preBuiltTransportClient.addTransportAddress(
            new InetSocketTransportAddress(InetAddress.getByName(endPoint), javaPort))) {
    
        populateIndex(transportClient, newIndexName, produtoService);
        reassignAlias(transportClient, newIndexName);
        cleanIndices(transportClient, newIndexName);
    }
    catch(IOException e) {
        logger.error(e.getMessage(), e);
    }
}
1 Like