-
Notifications
You must be signed in to change notification settings - Fork 346
Fix datacollectors temporary files cleanup. #1483
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -340,12 +340,32 @@ protected virtual void Dispose(bool disposing) | |
| { | ||
| if (disposing) | ||
| { | ||
| CleanupPlugins(); | ||
| } | ||
|
|
||
| this.disposed = true; | ||
| } | ||
| } | ||
|
|
||
| private void CleanupPlugins() | ||
| { | ||
| EqtTrace.Info("DataCollectionManager.CleanupPlugins: CleanupPlugins called"); | ||
|
|
||
| if (!this.isDataCollectionEnabled) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| if (EqtTrace.IsVerboseEnabled) | ||
| { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we do this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid new string allocation. |
||
| EqtTrace.Verbose("DataCollectionManager.CleanupPlugins: Cleaning up {0} plugins", this.RunDataCollectors.Count); | ||
| } | ||
|
|
||
| RemoveDataCollectors(new List<DataCollectorInformation>(this.RunDataCollectors.Values)); | ||
|
|
||
| EqtTrace.Info("DataCollectionManager.CleanupPlugins: CleanupPlugins finished"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
why not here then
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is compile time string. already created. |
||
| } | ||
|
|
||
| #region Load and Initialize DataCollectors | ||
|
|
||
| /// <summary> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here