This project has moved. For the latest updates, please go here.

Disposing Objects

Sep 11, 2014 at 10:08 AM
I created a mvc webapplication with visual studio and it created the template using owin.
I see that the disposing of the object configured with 'CreatePerOwinContext' never called automatic dispose as I would expect at the end of the request.

For example in IdentityConfig there is this code in the static Create method:
var manager = new ApplicationUserManager(new UserStore<ApplicationUser>(context.Get<ApplicationDbContext>()));

so in this case, the ApplicationDbContext is created but is never called its dispose method (I checked it overriding the dispose method in applicationdbcontext).

is there a way to call dispose method automatically?
Sep 11, 2014 at 5:47 PM
This is an issue with Identity extension method and will be fixed in the next release