zzzprojects / EntityFramework-Plus

Entity Framework Plus extends your DbContext with must-haves features: Include Filter, Auditing, Caching, Query Future, Batch Delete, Batch Update, and more
https://entityframework-plus.net/
MIT License
2.27k stars 318 forks source link

Query Filter Memory Leak for EF6.2 #382

Open CodeMatt17 opened 6 years ago

CodeMatt17 commented 6 years ago

We are using the context filters (i.e. .Filter()) with EF6.2. We have noticed we regularly get to a point where our server throws an out of memory exception due to the context filters not garbage collecting properly. Will this memory leak ever be fixed?

JonathanMagnan commented 6 years ago

Hello @CodeMatt17 ,

If you only have to filter DbSet (not lazy loading or include), you can use Query DbSet ( It doesn't have such issue): http://entityframework-plus.net/query-db-set-filter

We are currently re-writing all our features in our new library: http://entityframework-classic.net/, so we will have the chance to re-visit the QueryFilter very soon and import some code/fix in EF+ if possible.

Best Regards,

Jonathan