Hi,
this is my code :
instrumentsInQuestion.forEach(instrument -> arrayI.add(EmaFactory.createOmmArrayEntry().codeState().ascii(instrument.getRootSymbol())));
arrayView.add(EmaFactory.createOmmArrayEntry().intValue(1));
batchView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, arrayI));
batchView.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
batchView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, arrayView));
ReqMsg reqMsg = EmaFactory.createReqMsg();
reqMsg.serviceName(serviceName).payload(batchView).interestAfterRefresh(false).initialImage(true);
consumer.registerClient(reqMsg, appClient);
....
i collect the handleids and unregister the instruments from
instrumentsInQuestion.forEach(instrumentInQuestion -> {
try {
CompletableFuture.supplyAsync(() -> {
try {
if (instrumentInQuestion.getHandleId() != null)
consumer.unregister(instrumentInQuestion.getHandleId());
else
log.info("Could not get handlerid for "+instrumentInQuestion.getRootSymbol());
} catch (Exception e) {
e.printStackTrace();
}
return true;
}).get(20, TimeUnit.SECONDS);
} catch (InterruptedException | ExecutionException | TimeoutException e) {
log.severe("Error unregistering " + instrumentInQuestion.getRootSymbol());
}
});
i have attached the heat dump, screen shoot.
My question is what am i doing wrong and I have 1.6GB of memory wasted?