I am using ThreadedDepthCacheManager to keep a local order book for many pairs. The order book depth is only 5. The problem is that the memory consumption is getting bigger and bigger until the process stops working or gets killed by the operating system.
Here is the minimal code that causes the problem. Just keep track of the process memory consumption for some minutes.
I am using ThreadedDepthCacheManager to keep a local order book for many pairs. The order book depth is only 5. The problem is that the memory consumption is getting bigger and bigger until the process stops working or gets killed by the operating system.
Here is the minimal code that causes the problem. Just keep track of the process memory consumption for some minutes.
Maybe I missing something in this implementation, or do we have a memory leak?
Environment :