SharePoint [debugging, diagnostics series]-Use of the spdisposecheck memory leak check tool

Source: Internet
Author: User

Spdisposecheck is an essential tool for developing SharePoint projects, it can be used to check whether the code we write correctly destroys "large resource consumption" such as spsite or spweb. (opening a spsite or spweb object will occupy 1 MB to 2 MB of memory, if you keep opening such objects and do not close them in time, your memory will be quickly consumed). Now this tool has a new version, which makes it easier to install and use.
First download from SharePoint dispose checker tool.
Then go to the installation page. During the installation process, you will be asked to determine the default settings, such as (usually selected)


 
If you continue the installation, you will be asked about the installation path, which is the default path I selected.

 

After the installation is successful, open your visualstudio2010 and you can find the tool directly under the Tools menu (is it much easier to install than the previous version ?)

 
If you select this menu item, the following interface will pop out. First, if there is a problem, whether it is displayed as "error" or "warning ". Then it is the time to check. By default, the check is executed after build. The next step is to set the object to be checked, which is generally the assembly of your project.

After you build the project, spdisposecheck runs and displays the check result.

You can seek online help to modify your code with the support of the help document.

 

Then build the project and check whether the modification is valid.

 

 

For more information about how to write high-quality code to avoid potential memory leakage, see Best Practices: using disposable Windows SharePoint Services objects.

Spdisposecheck is an essential tool for developing SharePoint projects, it can be used to check whether the code we write correctly destroys "large resource consumption" such as spsite or spweb. (opening a spsite or spweb object will occupy 1 MB to 2 MB of memory, if you keep opening such objects and do not close them in time, your memory will be quickly consumed). Now this tool has a new version, which makes it easier to install and use.
First download from SharePoint dispose checker tool.
Then go to the installation page. During the installation process, you will be asked to determine the default settings, such as (usually selected)


 
If you continue the installation, you will be asked about the installation path, which is the default path I selected.

 

After the installation is successful, open your visualstudio2010 and you can find the tool directly under the Tools menu (is it much easier to install than the previous version ?)

 
If you select this menu item, the following interface will pop out. First, if there is a problem, whether it is displayed as "error" or "warning ". Then it is the time to check. By default, the check is executed after build. The next step is to set the object to be checked, which is generally the assembly of your project.

After you build the project, spdisposecheck runs and displays the check result.

You can seek online help to modify your code with the support of the help document.

 

Then build the project and check whether the modification is valid.

 

 

For more information about how to write high-quality code to avoid potential memory leakage, see Best Practices: using disposable Windows SharePoint Services objects.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.