mbdavid/LiteDB

[BUG] Memory Leak

kimdiego2098 opened this issue · 1 comments

Version
5.0.1.7

Describe the bug

When using Query.LT or other code for BsonExpressionScalarDelegate , looking up the source code may reveal that there is a dictionary storing expressions, but this dictionary cache is the root cause of memory leakage. I think it should be changed to memorycache (i.e. adding timeout clearing). As can be seen from the graph, the number of dictionary elements has reached over 4000

I had to change the Queries to use Lambda expressions.But this is inconvenient, and there may still be different keys in the dictionary, leading to memory leaks

A_{KP1B6LJ3I)V015VER755

Code to Reproduce

image

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots/Stacktrace
If applicable, add screenshots/stacktrace

Additional context
Add any other context about the problem here.

@mbdavid Sorry to bother you, but this is a serious memory leak issue