title: Memory leak in Owin.AppBuilderExtensions
body: <p>I use OWIN + Microsoft.AspNet.Identity.Owin (v.2.0.0.0) in Web application. I register UserManager/DbContext per web request, as widely recommended:</p>
  
  <pre><code>app.CreatePerOwinContext(ApplicationDbContext.Create);
  app.CreatePerOwinContext&lt;ApplicationUserManager&gt;(ApplicationUserManager.Create);
  </code></pre>
  
  <p>but neither is ever disposed. I took a glance look into reflector and it seems like a bug in extension method:</p>
  
  <pre><code>public static IAppBuilder CreatePerOwinContext&lt;T&gt;(this IAppBuilder app, Func&lt;IdentityFactoryOptions&lt;T&gt;, IOwinContext, T&gt; createCallback) where T: class, IDisposable
  {
      if (app == null)
      {
          throw new ArgumentNullException("app");
      }
      if (createCallback == null)
      {
          throw new ArgumentNullException("createCallback");
      }
      object[] args = new object[1];
      IdentityFactoryOptions&lt;T&gt; options = new IdentityFactoryOptions&lt;T&gt; {
          DataProtectionProvider = app.GetDataProtectionProvider()
      };
      IdentityFactoryProvider&lt;T&gt; provider = new IdentityFactoryProvider&lt;T&gt; {
          OnCreate = createCallback
      };
      options.Provider = provider;
      args[0] = options;
      app.Use(typeof(IdentityFactoryMiddleware&lt;T, IdentityFactoryOptions&lt;T&gt;&gt;), args);
      return app;
  }
  </code></pre>
  
  <p>IdentityFactoryProvider has two callbacks - create and dispose, but dispose callback is not registered here. I also confirmed my suspicion with memory profiler.</p>
  
  <p>I don't see Owin on codeplex/github (actually I thought it is open source), so I don't know where to ask my question: could anyone else confirm this is memory leak?
  I'm not that sure because google says nothing about it, I expect it should be discussed everywhere, if this is a bug.</p>