From 887bbdc3b042e4486bc8e2ef2ca03998abacec79 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Dec 2015 11:32:50 +0100 Subject: [PATCH] dont' set applicationcontext to null on dispose for request based lifespan instances since applicationcontext is a singleton lifespan. --- src/Umbraco.Web/Security/WebSecurity.cs | 1 - src/Umbraco.Web/UmbracoContext.cs | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web/Security/WebSecurity.cs b/src/Umbraco.Web/Security/WebSecurity.cs index 4ace3b236b..eb0a1eb66a 100644 --- a/src/Umbraco.Web/Security/WebSecurity.cs +++ b/src/Umbraco.Web/Security/WebSecurity.cs @@ -462,7 +462,6 @@ namespace Umbraco.Web.Security protected override void DisposeResources() { _httpContext = null; - _applicationContext = null; } diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index 1c688080ce..3c2b7267a6 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -462,8 +462,6 @@ namespace Umbraco.Web Security.DisposeIfDisposable(); Security = null; _umbracoContext = null; - //ensure not to dispose this! - Application = null; //Before we set these to null but in fact these are application lifespan singletons so //there's no reason we need to set them to null and this also caused a problem with packages @@ -471,7 +469,8 @@ namespace Umbraco.Web //http://issues.umbraco.org/issue/U4-2734 //http://our.umbraco.org/projects/developer-tools/301-url-tracker/version-2/44327-Issues-with-URL-Tracker-in-614 //ContentCache = null; - //MediaCache = null; + //MediaCache = null; + //Application = null; } } } \ No newline at end of file