Fixing memory pressure when creating new tenants

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-09-08 14:57:08 -07:00
parent 09f9963502
commit 87f9b5f77c
5 changed files with 44 additions and 30 deletions

View File

@@ -167,6 +167,7 @@ namespace Orchard.Environment {
if (_current != null) {
foreach (var shellContext in _current) {
shellContext.Shell.Terminate();
shellContext.LifetimeScope.Dispose();
}
_current = null;
}