Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispose of ASP.NET Core bits #804

Merged
merged 6 commits into from
Feb 24, 2017

Conversation

iantalarico
Copy link
Contributor

Properly dispose of ASP.NET Core bits.

  1. Services registered with HttpConfiguration that implement IDisposable are cleaned up automatically.
  2. We dispose of CloudTrace via Event Handlers that are called during dispose.
  3. Properly Dispose of the ErrorReportingExceptionFilter #803 To track proper disposal for ErrorReportingExceptionFilter.
  4. Properly Dispose of all ASP.NET Core Middleware #802 To track proper disposal for ASP.NET Core Middleware.

Copy link
Collaborator

@jskeet jskeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense in general - adding IDisposable increases the burden of using these classes of course, but it sounds like that's basically unavoidable :(

@@ -110,8 +112,14 @@ public static void Initialize(string projectId, HttpApplication application, Tra
// Add event handlers to the application.
application.BeginRequest += trace.BeginRequest;
application.EndRequest += trace.EndRequest;
application.Disposed += trace.Disposed;

This comment was marked as spam.

This comment was marked as spam.

@iantalarico
Copy link
Contributor Author

Thanks Jon

@iantalarico iantalarico merged commit 4012a54 into googleapis:master Feb 24, 2017
@iantalarico iantalarico deleted the asp-net-disposable branch March 9, 2017 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants