Sorry forgot to attach heapdump. Actually file is too big, unable to upload. It is easy to reproduce.
First heapdump (2ObjectsAddedAndDestroy.snapshot) when I created only 2 cache and then call destroy to get rid of it and second heapdump (250objectsAddedAndDestroy.snapshot) when I added 250 caches and then invoke destroy call.
2ObjectsAddedAndDestroy.snapshot - com.hazelcast.map.impl.PartitionContainer[271] 91728 1104
250objectsAddedAndDestroy.snapshot - com.hazelcast.map.impl.PartitionContainer[271] 111568 1104
Code snippet :
ClientConfig clientConfig = new ClientConfig();
clientConfig.setClusterName("dev");
clientConfig.getNetworkConfig().addAddress("
127.0.0.1:5701");
HazelcastInstance hz = HazelcastClient.newHazelcastClient(clientConfig);
for(int i=1;i< 250; i++) {
IMap<String, TestTrade> map = hz.getMap("com.calypso.tk.domain.Test"+i);
map.put(String.valueOf(i), new TestTrade(BigInteger.valueOf(i)));
map.destroy();
}
import java.io.Serializable;
import java.math.BigInteger;
public class TestTrade implements Serializable{
private BigInteger bI= new BigInteger("1000");
public TestTrade(BigInteger b) {
this.bI=b;
}
}