Exception of type 'System.OutOfMemoryException' was thrown. Why?

前端 未结 5 1921
刺人心
刺人心 2021-02-05 11:20

I have a dynamic query that returns around 590,000 records. It runs successfully the first time, but if I run it again, I keep getting a System.OutOfMemoryException

5条回答
  •  一整个雨季
    2021-02-05 11:57

    Perhaps you're not disposing of the previous connection/ result classes from the previous run which means their still hanging around in memory.

提交回复
热议问题