Entity framework uses a lot of memory

后端 未结 4 2293
再見小時候
再見小時候 2021-01-04 05:44

Here is a image from the ANTS memory profiler. It seens that there are a lot of objects hold in memory. How can I find what I am doing wrong?

4条回答
  •  生来不讨喜
    2021-01-04 05:56

    Do you clear the ObjectContext once in a while. If you keep an ObjectContext alive for a long time this will consume memory related to the size of the EntityDataModel and the number of Entities loaded into this ObjectContext.

提交回复
热议问题