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.