How to detect where a Memory Leak is?

后端 未结 12 1755
感动是毒
感动是毒 2020-12-13 11:00

I have a large website that seems to be sucking up all the memory that is being allocated. There is nothing else on the server beside this site. Within a week it eats away t

12条回答
  •  暖寄归人
    2020-12-13 11:53

    This is probably prevention rather then detection, but at the c# code level, you should check that any classes that use large resources such as images and other files are correctly implementing the dispose pattern. If needed you may also need to override the finalizer.

    MSDN has good guidance on this subject.

    If you have any classes in your application that you know make use of large resources, these are the first places to look for memory issues.

提交回复
热议问题