From: <jer...@us...> - 2010-02-04 02:42:36
|
Revision: 335 http://structuremap.svn.sourceforge.net/structuremap/?rev=335&view=rev Author: jeremydmiller Date: 2010-02-04 02:32:53 +0000 (Thu, 04 Feb 2010) Log Message: ----------- Added the ObjectFactory.ReleaseAndDisposeAllHttpScopedObjects() convenience method Modified Paths: -------------- trunk/Source/StructureMap/ObjectFactory.cs Modified: trunk/Source/StructureMap/ObjectFactory.cs =================================================================== --- trunk/Source/StructureMap/ObjectFactory.cs 2010-02-04 02:23:48 UTC (rev 334) +++ trunk/Source/StructureMap/ObjectFactory.cs 2010-02-04 02:32:53 UTC (rev 335) @@ -45,6 +45,14 @@ } } + /// <summary> + /// Remove and dispose all objects scoped by HttpContext. Call this method at the *end* of an Http request to clean up resources + /// </summary> + public static void ReleaseAndDisposeAllHttpScopedObjects() + { + HttpContextLifecycle.DisposeAndClearAll(); + } + public static void Initialize(Action<IInitializationExpression> action) { lock (typeof (ObjectFactory)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |