Hi,
I'm evaluating ObjectDB and certainly new to it.
I'm seeing a possible memory leak in ObjectDB or it could be my abusive use of it.
Basically I'm adding 1 million objects into it and then retrieve each of the object one by one. The object is key by Long.
Here is the jmap at time1:
num #instances #bytes class name ---------------------------------------------- 1: 704422 950869896 [B 2: 6257543 300362064 com.objectdb.o.STA 3: 347641 72309328 com.objectdb.jdo.PMImpl 4: 347136 50256896 [I 5: 347641 47279176 [Lcom.objectdb.o.LRQ; 6: 347641 47279176 [Lcom.objectdb.o.ENT; 7: 347641 30592408 com.objectdb.o.STM 8: 347756 27821784 [Ljava.util.HashMap$Entry; 9: 347641 27811280 com.objectdb.o.LDR 10: 335544 24159168 com.objectdb.o.QRQ
Here is the jmap at time1 + 1 minute:
num #instances #bytes class name ---------------------------------------------- 1: 704422 953667840 [B 2: 6781649 325519152 com.objectdb.o.STA 3: 376758 78365664 com.objectdb.jdo.PMImpl 4: 376758 51239088 [Lcom.objectdb.o.LRQ; 5: 376758 51239088 [Lcom.objectdb.o.ENT; 6: 344917 47577920 [I 7: 376758 33154704 com.objectdb.o.STM 8: 376870 30150944 [Ljava.util.HashMap$Entry; 9: 376758 30140640 com.objectdb.o.LDR 10: 753873 24416568 [Ljava.lang.Object; 11: 335544 24159168 com.objectdb.o.QRQ
Notice com.objectdb.o.STA and other HashMap.
Here is the code that retrieves the data. I'm pretty sure I'm not holding objects that I'm using directly that causes ever expanding memory usage. I'm putting my code as a reply to this topic.