HttpApplication Leak in SharePoint 2007 - Workaround with Init() virtual method

Todd Carter has recently discovered a significant memory leak with MOSS 2007 and WSS 3.0 which can quickly lead to Out Of Memory conditions under load even if you are following all of the Dispose() guidance rules within your code.  Note this leak does not apply to SharePoint Server 2010 / SharePoint Foundation 2010 and there is a fix coming from the Product Team soon for MOSS 2007 but until then Todd offers a coded workaround by allowing SPHttpApplication register itself only once within the Init() virtual method.  To be clear, until the fix is released and installed or the coded work around is applied this leak potentially can impact every MOSS 2007 / WSS 3.0installation and not just web applications that been customized with code.

Make sure you read Todd’s excellent blog post SharePoint’s Sasquatch Memory Leak .