I'm using Newtonsoft.Json
lib for deserializing several JSON
.
I'm re-using the default contract resolver and I'm aware that it caches the types for future uses.
Here's a print from the memory issue.
My problem is that these types will never be the same (I'm always changing the json used), since my program runs indefinitely my memory keeps raising over time. Is there a way to clear this cached Contract Resolvers from time to time?
UPDATE 1
I tried @dbc answer and the memory raise from the ThreadSafeStore is not raising anymore: dbc answer , but the ConcurrentDictionary's keeps on raising,is there anything to fix this? ConcurrentDictionary's