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

前端 未结 5 1918
刺人心
刺人心 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:37

    You're obviously not disposing of things.

    Consider the "using" command when temporarily using objects that implement IDisposable.

提交回复
热议问题