Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S SharePoint.WarmUp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 14
    • Issues 14
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CodePlex
  • SharePoint.WarmUp
  • Issues
  • #1

Closed
Open
Created May 30, 2018 by Laurent Sittler@lsittler©Owner

Non disoposal of SPSite and SPWeb

This method in WarmUpJobDefinition.cs does not dispose sites and webs

void AwakeWebApplication(SPWebService webService, Guid webApplicationId)
        {
            // Creating thread for async work
            Thread webApplicationThread = new Thread(delegate(object param)
            {
                SPSiteCollection siteCollection = webService.WebApplications[(Guid)param].Sites;

                // Browsing all site collection of the WebApplication
                foreach (SPSite site in siteCollection)
                {
                    SPWebCollection webs = site.AllWebs;

                    // Browsing each web of the site
                    foreach (SPWeb web in webs)
                        AwakeURL(web.Url);
                }
            });

            // Start the thread
            webApplicationThread.Start(webApplicationId);
        }
Assignee
Assign to
Time tracking