Jun 18, 2019 03:29 PM|bruce (sqlwork.com)|LINK
the GC only tracks managed memory. if the object, like a database context, uses unmanaged memory, the GC does not know about it. You must call Dispose() to free the unmanaged memory. also the GC favors alloc over compact (at least until core 3.0 with memory
most likely you are not calling Dispose(). if you inject a dbcontext into a controller, the controller dispose should call dispose on the dbcontext. be sure you are doing this.