How to debug the potential memory leak?

后端 未结 4 1163
醉话见心
醉话见心 2021-01-06 03:02

I programed the windows service to do a routine work.

I InstallUtil it to windows service and it\'will wake up and do something and then thread.sl

4条回答
  •  时光取名叫无心
    2021-01-06 04:01

    Difficult to say, but I suspect this line in your while loop within DoWork:

    JsonIn jsonIn = new JsonIn { KeyString = "secretekeystring", };
    

    Although jsonin only has scope within the while block, I would hazard that the Garbage Collector is taking its time to remove unwanted instances.

提交回复
热议问题