Memory leak that GC doesn’t fix regarding .Net Entity Framework version 8 (C# console app .Net8.02 )
For most things I write, I usually don’t care about memory usage, however, I have a console app written in .Net8.02 using EF8, that leaks 2MB every time an EF transaction is called. I’ve tried every conceivable arrangement of GC (garbage collector) trying to force .Net to release memory between calls, but the leak persists. I’ve also put code snippets in all sorts of places to track memory usage and it all comes back to EF. 2MB may not seem like much, but, daily, this program reads in about 5,000 log files (or more) and the program crashes the machine (VM or real) – I wrote a memory monitor with GC to look at available memory, then stop processing and wait until it goes back down (it never does!).